Regex for number with whitesapce

Hi There,

I have text content and want to search phone number or any number with white space in it.
i tried with simple regex [0-9]{4} which matching something like below .

eg:- {text : " this is my phone number 1234 5678 90"}

i want to match entire string 1234 5678 90 along with space

Thanks in advance.

You can use
text : ".* [0-9]{4}
for {text : "this is my phone number 1234 5678 9088"}

Thanks Dhananjaya,
Is there any alternate solution. i have tried the same but it didn't work as expected.
i have tried all possible regex pattern but no luck.

help will be appreciated.:slight_smile:

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