I want create the pattern, Which correspond to three symbol a, or tree symbol b
this is my code:
$str = 'aaa';
if (preg_match("#^aaa$|^bbb$#",$str)) {
echo 'yes';
}
in this code is anchor two times, this is working code , but it is interesting to me: this variant is correctament?
That is: To insert in a pattern of an anchor two (or more) times, it is justified?
Thanks


Sign In
Create Account


Back to top









