Need to an expression that returns only things with an "I" followed by either a "J" or a "V" (No Quotes) and then a minimum of 1 number up to 3 numbers.
I J### I V### I J## I V## I J# I v#
Thank to everyone who has already helped!
Need to an expression that returns only things with an "I" followed by either a "J" or a "V" (No Quotes) and then a minimum of 1 number up to 3 numbers.
I J### I V### I J## I V## I J# I v#
Thank to everyone who has already helped!
Depends on your flavor
I(J|V)[0-9]{1,3}
Do you also need a space after an "I"?
I (J|V)[0-9]{1,3}
Your description does not match your example, and there are some idiomatic things that you'll need to take care of (case insensitivity, that depends on the regex engine)
I [JV]\d{1,3}
This will match
But WILL NOT MATCH
Tested with RegExBuddy:
I [JV]\d{1,3}\s
Edited:
Pretty much like Vinko Vrsalovic one, but with his, if you have I J12345678, It will grab "I J123" in your expression. Adding \s demands a special char at the end, like a space, line feed, etc...
I think the others missed the v#
spec.
I[JVv]\d{1,3}
Of course perhaps the lowercase v
was a typo.