![]() |
#1 |
Member
![]() Posts: 18
Karma: 10
Join Date: Dec 2010
Location: Geelong, Australia
Device: Kobo
|
how do I span more than one line with regex
G'day,
I've trolled through the forum and looked elsewhere for the the magic switch that will allow me to collect the text between, say for example, <head> and </head>. I can get the regex to collect when all is on one line but, according to my searching, I need to tell Sigil to allow the dot to collect the newlines as well. How do I do that? I am using <head>(.*?)</head> to do the finding and the collection. |
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 970
Karma: 4999999
Join Date: Mar 2009
Location: Rosario, Argentina
Device: SONY PRS-505, PRS-T2
|
Search for <head>(.+)</head> with "Regular Expression" and "Minimal matching" selected.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Member
![]() Posts: 18
Karma: 10
Join Date: Dec 2010
Location: Geelong, Australia
Device: Kobo
|
Thanks Pablo,
That worked. I note that I had to drop the "?". I'll need to study the Sigil manual and other references a bit more to understand why so that I can let others know if the future. Just in case you aren't around ![]() |
![]() |
![]() |
![]() |
#4 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 970
Karma: 4999999
Join Date: Mar 2009
Location: Rosario, Argentina
Device: SONY PRS-505, PRS-T2
|
I'm glad it worked. If you look for information, bear in mind that Sigil uses Qt regular expressions.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Average life span of a Kindle? | jbcohen | Amazon Kindle | 19 | 10-02-2011 08:19 PM |
Importing RegEx Line | TheEldest | Calibre | 1 | 07-05-2011 10:18 PM |
Remove <br /> together with span, and only span | Razzia | Recipes | 3 | 05-30-2011 06:55 PM |
'Heading color' and 'p class span' | mufc | Recipes | 7 | 12-22-2010 09:02 PM |
Insert new line with regex | deckoff | Sigil | 6 | 08-08-2010 11:24 AM |