I need a MySQL pattern to match a number, followed by a question mark.
I need something like
… like ‘%[0-9]?%’
but I have no idea how to create this regular expression.
http://dev.mysql.com/doc/refman/5.0/en/pattern-matching.html does not help.
Thanks!
I guess you’re looking for something like this:
Remember to escape the question mark. Otherwise, it will make the number optional.
Source.