[pmwiki-users] `WikiWord disables WikiWord ?

Patrick R. Michaud pmichaud at pobox.com
Fri Jul 29 01:27:34 CDT 2005


On Fri, Jul 29, 2005 at 05:46:56PM +1200, John Rankin wrote:
> >I think this is a shorter version, although it's still "yuck". 
> >:-)
> >
> >$WikiWordPattern =
> >'[[:upper:]](?=[[:lower:]0-9]*[[:upper:]])[[:upper:]]*[[:lower:]0-9][[:upper:]]*[[:lower:]0-9][[:alnum:]]*';
> >
> >Pm
> >
> What does ?= mean, exactly? 

It's a "lookahead" -- the pattern in the parentheses has to match at
that point, but it doesn't actually capture anything or change the
current match position.  So, the part in (?=...) first "looks ahead" to 
make sure there's a second uppercase character somewhere in the word.  If
not, it fails the lookahead (and thus the pattern); if there is, then 
we just need to find two lowercase characters, regardless of where 
the uppercase character ends up actually being.

> InTo appears to be not allowed, when it should be. 

Hmmm, it's working at http://www.pmwiki.org/wiki/Test/WikiWord2 .
Maybe there's an interaction with something else taking place...?

> But this stuff makes my brain hurt.

Mine too, at times.  :-)

Pm




More information about the pmwiki-users mailing list