Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-17-2016, 10:58 PM   #1
David Kudler
Enthusiast
David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'
 
David Kudler's Avatar
 
Posts: 48
Karma: 10000
Join Date: Apr 2011
Device: iPad
Question Regex wildcard trouble

Hi. Time for what is probably another stupid question.

I've been loving 0.9.4 — the ability to work with ePub3 is great, and the whole app is running more smoothly for me.

Except that I went to do a wildcard Regex search today — something I've done thousands of times... and it didn't behave normally.

The search was
Code:
mybook\.to(.*)
Every time I do a search, it finds
Code:
mybook.to
But it won't find the rest of the URL. When I tried
Code:
mybook\.to(.+)
it selected ONE more character: the forward slash. But the rest of the URL remained unselected.

I've got all four of the check boxes selected, but I also tried turning each of them off to no avail.

I'm running Sigil 0.9.4 on a Mac that sports OS X 10.11.3. (It's a MacBook Pro mid-2012 with a 2.9 GHz Intel Core i7 and 8GB of RAM, if that matters, which I am sure it doesn't.) All of the various libraries are up to date — I made sure when I undated last week.

What am I doing wrong?

(FWIW, I'm replacing Amazon links with links to my website so that I can use the ebook on other vendor sites. There are 84 of them; I'd really rather not go through and change them one by one. But besides, I use regex all of the time, and if it isn't going to behave, I need to find another option.)

Last edited by David Kudler; 03-17-2016 at 11:02 PM.
David Kudler is offline   Reply With Quote
Old 03-17-2016, 11:18 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,804
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
can you show a full example paragraph that contains mybook dot whatever
theducks is offline   Reply With Quote
Advert
Old 03-18-2016, 12:07 AM   #3
David Kudler
Enthusiast
David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'David Kudler knows the difference between 'who' and 'whom'
 
David Kudler's Avatar
 
Posts: 48
Karma: 10000
Join Date: Apr 2011
Device: iPad
Quote:
Originally Posted by theducks View Post
can you show a full example paragraph that contains mybook dot whatever
Sure:

Code:
<p style="text-align: center;font-size:1.125em;">
<a href="http://mybook.to/thevisitorarrives" style="font-style: italic;">
<img alt="ThreeforThree-cover" height="120" src="../Images/Visitor-collection-1.5-cover-200.jpg" width="75"/></a> 
<a href="http://mybook.to/visitor-other-3somes" style="font-style: italic;">
<img alt="ThreeforThree-cover" height="120" src="../Images/the-visitor-and-other-3somes-cover-4-200.jpg" width="75"/></a> 
<a href="http://mybook.to/threeforthree" style="font-style: italic;">
<img alt="ThreeforThree-cover" height="120" src="../Images/ThreeforThree-take7-200.jpg" width="75"/></a>
</p>
That's a line of book covers linked (currently) to Amazon pages for the books.

Do you see anything there that might explain what's going on?

I just tried Calibre... and couldn't get it to stop being greedy. Eesh.
David Kudler is offline   Reply With Quote
Old 03-18-2016, 07:44 AM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,804
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
The slash is tripping you up and needs escaping

Code:
mybook.to\/(.+?)"
I find all the way to the FIRST quote by making the preceding wildcard non-greedy with a ?
theducks is offline   Reply With Quote
Old 03-18-2016, 08:11 AM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,550
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
@OP: unchecking "Mimimal Match" allows both your expressions to work for me (the only box I have checked is "Wrap").

The only way I get your results (with your expressions) is if I check the "Minimal Match" box.

@theducks: his slash in his expression is being used to escape the "."

Last edited by DiapDealer; 03-18-2016 at 08:17 AM.
DiapDealer is offline   Reply With Quote
Advert
Old 03-18-2016, 10:21 AM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,804
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by DiapDealer View Post
@OP: unchecking "Mimimal Match" allows both your expressions to work for me (the only box I have checked is "Wrap").

The only way I get your results (with your expressions) is if I check the "Minimal Match" box.

@theducks: his slash in his expression is being used to escape the "."
I was referring to the one in his sample,which is right after the to(domain)
theducks is offline   Reply With Quote
Old 03-18-2016, 11:02 AM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,550
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by theducks View Post
I was referring to the one in his sample,which is right after the to(domain)
Yes, but that wasn't part of his expression. The slash in his sample would have been matched by the (.+) or the (.*) in his expressions. My point was that his expressions, do exactly for me, what I'm assuming he wants them to do for him--as long as "Minimal Match" is unchecked. I'm not experiencing the same behavior he is with the exact same sample/expression/settings it seems.
DiapDealer is offline   Reply With Quote
Reply

Tags
regex, troubleshooting


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need regex help, please magmanpi Sigil 13 08-29-2014 04:34 AM
Regex help anyone? seanos Editor 17 04-02-2014 11:03 AM
Regex Gunnerp245 Conversion 5 03-05-2012 04:15 PM
Find and replace string with wildcard jhempel24 Sigil 15 11-12-2010 01:50 PM
Help with a regex A.T.E. Calibre 1 04-05-2010 07:50 AM


All times are GMT -4. The time now is 10:47 AM.


MobileRead.com is a privately owned, operated and funded community.