Gelly for string regex replace

Hi team. I'm replicating shopify customer records that have a phone property which could be: +XXXXXXXXXXX XXXXXXXXXXX (XXX) XXX XXXX XXX-XXX-XXXX So I want to have a way to filter a normalized version of this number that is just the digits. I thought using a gelly filter would be good here, but there doesn't seem to be a way to remove non-digits via Gelly. What should I do here?
2 Replies
NeonPulse
NeonPulse3w ago
You can’t strip non-digits with Gelly right now. it doesn’t support regex replace or character removal. Best workaround is: Option 1 (Recommended): Normalize the phone number before it hits Gelly (your code / webhook / flow). Just run a simple regex like:
phone.replace(/\D/g, "");
phone.replace(/\D/g, "");
Option 2: Use a small Custom Function in Gelly to run the same replace and output only digits. Option 3: If you’re syncing through something like Airbyte/Hevo, use their transform step instead. so, gelly can format/parse, but not “remove all non-digits”, so handle normalization outside Gelly or with a lightweight function.
Henry
HenryOP3w ago
That helps, going with Option 1. Thank you!

Did you find this page helpful?