![]() |
#16 |
Enquiring Mind
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
|
*nods* - my post not intended as any comment on yours, Perkin - when I started typing, your post wasn't there - I got interrupted and came back, finished my post, then when I posted it, yours was already there.
![]() |
![]() |
![]() |
![]() |
#17 | |
eBook FANatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,301
Karma: 16078357
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Quote:
If Sigil used them we'd have the most powerful eBook editor known to mankind. ![]() ![]() ![]() |
|
![]() |
![]() |
Advert | |
|
![]() |
#18 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 697
Karma: 150000
Join Date: Feb 2010
Device: none
|
Quote:
If you go back to PDP-8's, you go back as far as I do! You can google "man perlre" and find the man pages for the PERL dialect of regex, which IMHO gives a fairly concise yet readable description. (The PERL dialect seems to come closest to what's used in Sigil.) |
|
![]() |
![]() |
![]() |
#19 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 657
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
|
I realised that, just pointing out that the site was also from the JGsoft team.
|
![]() |
![]() |
![]() |
#20 |
Jr. - Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 586
Karma: 2000358
Join Date: Aug 2010
Location: Alabama
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
|
My thanks to all who pitched in to help.
I think I understand the answers to my question. I still need to think about where the "\2" fits in (I understand, not in this case). I've bookmarked the tutorial sites and will study these and then probably buy RegexBuddy; Again thanks. Regards - John P.S. The ranks of those who have worked with the PDP-8 are starting to thin. I haven't fiddled with one for almost fifty years. Ye gods! That makes me feel old. ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#21 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,048
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Search: (\w+), (\w+) Replace: \2 \1 toggle toggle Deposit ![]() |
|
![]() |
![]() |
![]() |
#22 |
Jr. - Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 586
Karma: 2000358
Join Date: Aug 2010
Location: Alabama
Device: Archos, Asus, HP, Lenovo, Nexus and Samsung tablets in 7,8 and 10"
|
|
![]() |
![]() |
![]() |
#23 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 61
Karma: 12096
Join Date: Sep 2010
Location: Tasmania
Device: Sony PRS 650
|
Interesting discussion.
Why use .* instead of .+ Answer: because * looks for zero or more whilst + looks for one or more. If two underlines occurred next to each other they would not be found. Could that occur? Yes, because the italicized word was deleted at some stage but not the tags. It is worth noting that MS Word has an option to change the underline bracketed text to italic. Go to Format - AutoFormat - Options, or go to Tools - AutoCorrect Options - AutoFormat As You Type. It also deals with *words here* changed to bold. Concerning back referencing, you can also use a back reference in the Find box: Code:
_(.*)_ Code:
(_)(.*)\1 Code:
\2 |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Increase search and replace? | user_none | Conversion | 24 | 04-08-2011 03:59 PM |
search and replace - drops blanks in replace ? | cybmole | Conversion | 10 | 03-13-2011 03:07 AM |
macro - Search and Replace | oldbwl | Workshop | 17 | 03-05-2011 01:39 PM |
Search and replace in 0.2.0 | paulpeer | Sigil | 7 | 03-13-2010 11:59 AM |
Why no search and replace? | charleski | Sigil | 10 | 11-24-2009 04:13 PM |