Is there some quick and dirty way to detect is a string is a pure string, or if it is a regular expression.
Given:
$a="a.*b"; $b="acdb";
I am looking for a technique or method such that (in pseudocode):
methodIsItRegEx($a) == TRUE methodIsItRegEx)$b) == FALSE
In reply to Detecting if a string is a regular expression by smontsar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |