Today while reading Writing better Regular Expressions in PHP I learned that meta characters are treated as literals in character classes. So '/^(\d[.]\d)$/'
will match '1.2'
but not '1x2'
. Who knew!?
Today while reading Writing better Regular Expressions in PHP I learned that meta characters are treated as literals in character classes. So '/^(\d[.]\d)$/'
will match '1.2'
but not '1x2'
. Who knew!?