On Wed, Aug 26, 2009 at 06:07:02PM +0100, Hans wrote:
> I need a regex which finds text with open [@ markup bracket
> in a text string.
> It should match for instance
> abcd1...@xyz
> but not
> abcd1...@xyz@]
> Basically I want to remove open [@ character pairs from a text line.
>
> Can someone help please?
/\[@(?...@\])/
Broken down:
/ \[@ (?! .* @\] ) /
The first part finds [...@. The (?!...) is a negative lookahead.
The .* and @\] look for any subsequent @].
Pm
_______________________________________________
pmwiki-devel mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel