[Pmwiki-users] AsSpaced function released)

Patrick R. Michaud pmichaud
Sun Oct 10 14:42:40 CDT 2004


On Wed, Oct 06, 2004 at 11:10:07AM +1200, John Rankin wrote:
> On Tuesday, 5 October 2004 8:11 PM, chr at home.se wrote:
> >>     Markup('nowiki','>[[','/\b([[:upper:]][[:upper:]]+s)/e',
> >>            "Keep('$1')");
> >
> >Great!  Shouldn't there be something at the end of the pattern that 
> >indicates an 'end-of-word' there?
> 
> As I understand it (using 'understand' in the monkey see, monkey do sense),
> the \b says match whole words only. The good and bad thing about php (like
> fortran) is that it seems to work even if you aren't quite sure what you
> are doing.

Actually, the \b matches "word boundaries" -- i.e., places between an 
alphanumeric and non-alphanumeric character (or at the ends of lines).  
So you probably do want a \b at the end of the pattern as well, to prevent
things like CCDsPage from matching the above pattern.

Pm



More information about the pmwiki-users mailing list