The n? quantifier matches any string that contains zero or one occurrences of n.
The ? quantifier is supported in all major browsers.
Do a global search for a "1", followed by zero or one "0" characters:
The marked text below shows where the expression gets a match:
Your message has been sent to W3Schools.