How can I store text between 2 characters?

I’d like to get all the text between brackets from (123)(456)(789) and make it 123,456,789 by using executescripts_sandbox

  1. don’t use “executescripts_sandbox.” as it provides limited functionality. “executescripts” is the better choice

  2. I would use a javascript replace function:
    Replace all ‘(’ with ‘’ empty
    Replace all ‘)’ with ‘’ empty
    Replace all ‘)(’ with ‘,’

1 Like

thank you for the help. that works and I got another problem…what if I have to get one chunk of text between the sign '? like if there is abc’123’abc or ddd’123’kewf I need to remove all unneccessary characters

OK in this case I still would use ExecuteScript but inside of your JavaScript call use a regular Expression (regex) together with the replace function (you need to google it).
regex is for me not a very intuitive language and I still have my difficulties to get it together. But with googling examples I usually get my way around.

1 Like

Thank you for your help.