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

Popular posts from this blog

c++ - Linked List error when inserting for the last time -

java - activate/deactivate sonar maven plugin by profile? -

java - What is the difference between String. and String.this. ? -