Forum Academy Marketplace Showcase Pricing Features

Using Regex to convert a string to alphanumeric only

I’ve been working on a way to use the slug field to create vanity url’s to link directly to users in a member directory. This is working great with the exception of users who have decided to use non-alphanumeric characters and emojis in their names (which actually looks good so I don’t want to remove that ability).

I thought the best way to do this would be by using Regex (Bubble’s “Extract with regex function”) on the full string but can’t get it to work correctly using Regex strings online that should do so. E.g. /[^a-z0-9]/i

Any ideas?

I think this is what you’re after…


1 Like

Thanks so much for that @rmoffett

The bit I was missing was the final “format as text” and initial tests with various pesky named users are all working fine :+1:

Thanks again!

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