Regex to get text after string, without the new line

Hi guys,

I have the next string:
“Contact number: 07xxx”

I would like to extract only the phone number but without the lines below, I’m trying with this syntax but unfortunately it dosen’t work like I want. (?<=Contact number:).+

Thanks in advance!

give a try on following:




Hi @bogdanxd,

Every time you will have that line and phone number with digits? 10 or more digits?

Another idea might be:

For 10 Characters: (?<=Contact number: )\d{10}
For more characters: (?<=Contact number: )\d+


Thanks both of you for the fast response, I will try the approach provided by @ppr, but I will keep in mind your approch too, Vasile :slight_smile:

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