PHP: [[:<:]] and [[:>:]] anchors -
why doesn't work (neither matches nor not), seems not parse it.
<?php echo preg_match("/[[:<:]]name[[:>:]]/","my name max"); ?>
it doesn't output neither 0
nor 1
. why?
it seems have error reporting turned off. if you'd have enabled following error:
warning: preg_match(): compilation failed: unknown posix class name @ offset 3 in ...
this means can't have class name consisting of less sign ([[:<:]]
); give proper name instead.
Comments
Post a Comment