Thread: Reg-ex help...?
View Single Post
Old 12-05-2011, 08:30 PM   #9
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 698
Karma: 150000
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by ElMiko View Post
@ st_albert - nope. I'll try that on the next file i'm messing with. I remember looking up what "minimal matching" meant in the Sigil tutorial, but I guess I didn't/don't really understand. Could you explain it to me?
I'll try. Basically, with "minimal matching", the selected string will be the shortest one possible that matches the search pattern. Without "minimal matching" the string will be the LONGEST one possible that matches the pattern. Since the pattern Jabby proposed,

Code:
find:  <div>(.*)</div>
contains a "match any number of character" part [i.e. .*] without minimal matching, the string will match from the first <div> all the way to the LAST </div>. Whereas with minimal matching enabled, the selection will stop at the FIRST </div> after the <div>.

Probably Serpentine could explain this more succinctly.
st_albert is offline   Reply With Quote