Replace characters help needed please

Hi Fellow Bubblers! I hope all is well. I would need some assistance on replacing texts.
So here is my issue:

On my App I am planning to replace the entries with Unicode Characters. My question would be, how can I replace characters of a specific input in one go? I have tried find and replace “use regex” but I had no luck.

Here is an example:

Input value: abcdef. I would need to change this to ghijkl for example before I save it to the database. Please note I am not seeking to change words. I am seeking to change letters. Thank you! I’ve managed to do this on the browser side with Jquery, however it’s not a good option for me. So My plan is to save every data twice in the database. One would be regular text, the other would be unicode characters and I would display them depending on the User’s settings.

Just for additional info : replaceOnDocument(/A/g, “a”); This works when I use jQuery but I just can’t figure out how to put this Regex pattern into Bubble.

I tried (/A/g, “a”);
(/A/g, “a”)
/A/g, “a”
/A/g,

Nothing seems to do it

UPDATE

I got [a] replaced with A. This seems to work, however I am not sure if I can define multiple regex in 1 call? For example replace [a] with A and [b] with B and so on

you can combine as much :find & replace as you want (one after the other).

Thank you. But how would I add them together?

so I would use the next find and replace to work on the other find and replace’s result right?

I think I got this. Maybe I just needed a coffee. And I was hoping for an easier solution as we all always do :slight_smile: Thanks!

Yeah it’s not a very productive way to do it but it works.
There should be a way to do it with regex but i’m not experienced enough.

so yeah if you have 26 character to replace you’d have to chain 26 :find & replace actions

1 Like

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