Regex for single digit catches two digit numbers?
2
This regex catches two digit nubers:
if I have y11 it will still catch it, how to match only y0, y1, y2, y3, y4, y5, y6, y7, y8, y9 ?? After the digit there might be a blank space or a letter or a dot.
preg_replace('/y([1-9]{1})/', 'y0$1', $string)
php regex
[1-9]
will not catch0
though – brombeer Apr 5 at 10:44