I'm trying to do this thing that searches the number that is not followed by an "i", for example:
21i and 16, it should only match 16
I tried /\d+(?!i)/
but it also matches the 2 in 21i, how do i fix it?
So basically you need to find a cascade of numbers that not followed by an i
nor another number:
/\d+(?![i\d])/
You may see the test cases here
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments