Hello,
I'm looking to parse a 6 digit number that starts with 2 and ends with 4, but if the second to last digit is a 1 or a 2 then I don't want it to be picked up and parsed.
Right now my expression is: (2\d\d\d\d4)
For example if this is the data:
SO234574
Q289724
ASDI200094
I don't want it to pick up the blue line
Is there a way to do that?
Solved! Go to Solution.
that worked! thank you so much!
Can you please explain what this section means? [0-03-9]
Hi @arianner
Whenever you use open and close bracket with the values inside it, it will look for only those values.
Usually we will use [0-9] to read all the number.
As your requirement was different where, no 1 or 2 should be read.
Framed the expression as [0-03-9] to eliminate 1 and 2 in-between.
Hope it helps!!!
Many thanks
Shanker V
I was viewing this 0 as extra [0-03-9] but I see.
thank you!
Hi @arianner
Yes, we can use like this too. (2\d\d\d[03-9]4)
Just wanted to have some order while building expression, where I followed ranges format from my perspective.
(2\d\d\d[03-9]4)
(2\d\d\d[0-03-9]4)
Both the above will fetch the same result.
Many thanks
Shanker V