|
|
#1 |
|
eBook FANatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,301
Karma: 16078357
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Sigil and Regex
As a regex expert, I'm Emperor of the North. I usually use RegexBuddy from JGSoft which allows me to code a little, test a ltiile, and learn a lot.
Will someone tell me why the following PERL expressions will not work in Sigil? What changes are needed to make them work? Find all: Code:
[^~]+? Code:
[\dixvlcdm]+ |
|
|
|
|
|
#2 |
|
Member
![]() Posts: 24
Karma: 10
Join Date: Jun 2010
Location: Sofia, Bulgaria
Device: Kindle 3
|
What about:
# Non-greedy matching cannot be applied to individual quantifiers. Expressions like abc*?dd are not allowed. Use the Minimal matching option to set minimal matching on the whole expression. (the above taken from the manual) I have a question regarding yours I ahve the following code Code:
<table width="569" cellspacing="0" cellpadding="7" class="sgc-2" bordercolor="#000000" border="1">
<col width="553" />
<tr>
<td width="553" valign="top">
<h1>СЕКУНДЕРЕН КАРИЕС</h1>
</td>
</tr>
</table>
.... </h1>
That is what the manual says: Use the Minimal matching option to set minimal matching on the whole expression. So what is minimal matching, can someone help me here, I fiddled with lots of different staff, but I always want to end up with s/t like [\s|.]*? which appears not to be allowed... I want s/t like this <table [\s|.]*?<h1>( [\s|.]*?)</h1>( [\s|.]*?)</table>, but cannot figure out the right syntax for Sigil Thanx in advance... |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Member
![]() Posts: 24
Karma: 10
Join Date: Jun 2010
Location: Sofia, Bulgaria
Device: Kindle 3
|
<table ((\s|.|\>)+)<h1>((\s|.|\>)+)</h1>((\s|.|\>)+)</table> will do my trick.
And check minimal matching down left, the answer was much easier than I thought, sought hours in google to find what exactly minimal matching meant
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Regex engine? | troymc | Sigil | 10 | 07-09-2010 05:52 PM |
| What's wrong with this regex? | crutledge | Sigil | 1 | 05-11-2010 02:49 PM |
| What a regex is | Worldwalker | Calibre | 20 | 05-10-2010 06:51 AM |
| Help with a regex | A.T.E. | Calibre | 1 | 04-05-2010 08:50 AM |
| Regex help... | Bobthebass | Workshop | 6 | 04-26-2009 04:54 PM |