Extract numbers from text with Regex

Hi everyone, I’m trying to get

(xx) x xxxx-xxxx

return only

xxxxxxxxxxxx

with regex pattern can anyone help me?

1 Like

Hi there, @lukinhapophack… I’m guessing someone will come along with the expression you need, but in the meantime, you could do what you described by stringing :find & replace operators together to find parentheses, spaces, and dashes and replace those characters with nothing. That might seem kind of hacky, but it would still do the trick.

Best…
Mike

1 Like

Regex with find and replace: ^(+)|[^\d\n]

Regex with extract: \d+

Find and replace will prob work better as it’s not a list result like extract rather just the string. @lukinhapophack

2 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.