[pmwiki-devel] another regex pattern question
Peter Bowers
pbowers at pobox.com
Sun Aug 30 19:33:28 CDT 2009
On Sun, Aug 30, 2009 at 12:58 PM, Hans<design5 at softflow.co.uk> wrote:
>
> PS: this simpler pattern did not work:
>
> /\[([@=])(.*?)($pat)(.*?)\1\]/
>
...
Try this:
/\\[([@])(?:[^@]|@(?!]))*$pat(?:[^@]|@(?!]))@]/
Unfortunately, once again I can't generalize it to match both the
[@...@] and the [=...=] in the same pattern. I just can't figure out
how to match ([@=]) and later negate it in a character class like
[^\1].
-Peter
More information about the pmwiki-devel
mailing list