[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Possible bug with non-greedy matching in gsub
- From: crow <crow_64a@...>
- Date: Tue, 22 Feb 2005 15:32:46 -0000
Klaus Ripke <paul-lua@malete.org> wrote:
(22/02/2005 14:06)
>well, checked your example, and it behaves as expected:
>the match at 'Author: name3' extends to the next Email,
>which is the next line,
>and the match at 'Author: <b>name3' also extends to the next Email,
>which is found only in the next message.
>
>exactly as should be.
>
>---
>××Author: name3
>Email: name3@hotmail.com
>Host: ---.chartermi.net
>Created: 8:47:55 PM 02-14-2001 (PST)
>Subject: THIS IS THE ONE TO WATCH
>With the color change...
>
>××Author: <b>name3 <Title Tag></b> (---.chartermi.net)<br>
>Date: 02-14-01 19:57<br><br>
>color change!!! hahahahaha</font><p>
>
>Without...
>
>Author: <b>name3<font color="darkgreen"> <Title Tag></font></b>
>(---.chartermi.n
>et)<br>
>Date: 02-14-01 19:58<br><br>
>I guess I'll keep the green one. LOL</font><p>
>
>
>
>You got it right name5
>
>
>
>Author: Another Thinger
>Email: xyz@excite.com
>---
Sorry, it does indeed.
I get confused when converting RegExp from TextPad, which doesn't search beyong a newline unless asked to, and I thought that explicitly stating one after the repeat operator would make Lua act the same way. I checked to see if doing this with other explicit chars would limit the match in a single line in TextPad, and it didn't... I had been thinking it would, as I'd not worked on something that would prove the point there, as it always works on a per line basis anyway, and most of my needs in this task had been the same until now.
Thanks. And to Rici too.