Do a global search for the numbers that are NOT 1 to 4 in a string:
The marked text below shows where the expression gets a match:
The [^0-9] expression is used to find any digit NOT between the brackets.
The digits inside the brackets can be any numbers or span of numbers from 0 to 9.
Tip: Use the [0-9] expression to find any digit between the brackets.
The [^0-9] expression is supported in all major browsers.
Do a global search for numbers that are NOT "1" in a string:
The marked text below shows where the expression gets a match:
Do a global search for numbers that are NOT 5 to 8 in a string:
The marked text below shows where the expression gets a match: