What's wrong with my RegEx formula?

Hi, can you give me advice how to fix it?
In that case I just want to clear all non-digits from field.
SCR-20230715-rort

This works for me
regex_replace(field(‘Name’),’[^0-9]’,’’)

The ‘’ on the end are two separate ’ characters. So in your case you have to only remove the exclamation mark.

Yes, this is exactly what I want (about “exclamation mark”…)
But! it doesn’t seem to be working with “Phone” field type.

Perhaps some kind of bug…
SCR-20230716-nffx

I don’t know if it is a bug. Maybe it is a feature :wink:

What I can think of is that the Phone field is a special field inside a database. RegEx only works with text.

But…
The field URL works
The field Email doesn’t work

If you make the Phone field a single text field it works.

Maybe @olgatrykush can ask the team if this is a bug?

Thanks @Peter for helping out here :hugs:

Sure, let me quickly check this with the team to be sure :ok_hand:

Hey @levinside, that is indeed a bug, and we are going to fix it: Bug with Regex function for phone number and email fields. (#1852) · Issues · Baserow / baserow · GitLab. Thank you for bringing it to our attention.

2 Likes