For the record, this is not a bug.  Here's what happens:

Text
example

Find
(.*)

The regex engine starts out trying to match at the beginning of the string,
just before the first e.  .* matches the e, then the x, and so on until it
has matched 'example'.  . can't match newline, and as that's the end of
the regex, a successful match has been found.

Then the regex engine tries to match from where it left off, between the
second e and the newline.  .* matches zero characters, then can't match the
newline.  As that's the end of the regex, another successful match has been
found.

Then the regex engine tries to match from where it left off, still between
the second e and the newline.  .* matches zero characters, then can't match
the newline.  That would be a successful match, but the engine has already
found a zero-length match at this position.  To avoid an infinite loop, the
regex engine skips this match, advances one character, and tries again.

Ronald

-- 
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to