Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 07-14-2010, 01:21 PM   #1
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 18,301
Karma: 16071131
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:
[^~]+?
Find number:
Code:
[\dixvlcdm]+
All help accepted and appreciated.
crutledge is offline   Reply With Quote
Old 07-14-2010, 03:30 PM   #2
deckoff
Member
deckoff began at the beginning.
 
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>
I what to make a search that finds <table and the FIRST </h1> stops right there and goes to the </table> in which the </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...
deckoff is offline   Reply With Quote
Advert
Old 07-14-2010, 04:51 PM   #3
deckoff
Member
deckoff began at the beginning.
 
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
deckoff is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regex engine? troymc Sigil 10 07-09-2010 04:52 PM
What's wrong with this regex? crutledge Sigil 1 05-11-2010 01:49 PM
What a regex is Worldwalker Calibre 20 05-10-2010 05:51 AM
Help with a regex A.T.E. Calibre 1 04-05-2010 07:50 AM
Regex help... Bobthebass Workshop 6 04-26-2009 03:54 PM


All times are GMT -4. The time now is 07:39 PM.


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