Regex Builder, multiple condition

Sample Text:
This is just a sample text, 9846001122 and this is just a sample text 984626998877 and this is just a sample text 974456956 and this is just a sample text 9846265485

I’m using regex builder to get some specific numbers from the sample text, for example number starting with 9846 and have a total length of 8.
I used regex mode as ‘Advanced’ and used value [9][8][4][6]\d{4} wwith qualifiers as exactly.

output will be: 98460011, 98462699 and 984626

It is working fine

Now, I need to get numbers starting with 9744 and have a total length of 8 along with the above numbers

Means I need to get the list which have the the 9846 and 9744 numbers

I’m not able to find a solution for it.

TIA

To make the code readable I’d rather for each loop over the string split by space char.

length for both cases is still 8?

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.