I\'ve been having some trouble with regular expressions.
This is my code
$pattern = \"^([0-9]+)$\"; if (preg_match($pattern, $input)) echo \"yes
You can use T-Regx library, that doesn't need delimiters
pattern('^([0-9]+)$')->match($input);