Hi Colleagues,
I would like to ask you for advice regarding removing special characters. I tried to use Regex but because the special character is " // " then it is read as part of the formula.
I would like to remove "//" only when there is not text before/after/ Please see the example.
Current situation
1. // // text1 // text2
2. text1 //
3. text1 // // text2
Desire outcome
1. text 1 // text 2
2. text 1
3. text 1 // text 2
Thank you in advance,
Asia
Solved! Go to Solution.
Hi @joannasokolowska ,
Use the below formula in formula tool.
TrimLeft(TrimRight(Replace([Field1], "// //", "//"),"//"),"//")
Output:
Workflow:
Hope this helps 🙂
If this post helps you please mark it as solution. And give a like if you dont mind 😀👍
Hi @joannasokolowska ,
you want to remove only leading/trailing "//"? Formula tool can be used to do this, I think, RegEx is not needed.
I've attached a workflow. Let me know if it works for you, especially line 3 ("// //" is not replaced by "//" matching your description, but not the sample.
Best,
Roland
Hi @joannasokolowska , if you want to perform it using regex you need to use 2 regex tool first to replace // // with // and then removing leading and trailing //. Please refer to the screenshot and workflow.
Thanks.
Thank for the quick help! Is there a way to not limit number of // ? I didn't mention before but there could be more situations where I have e.g. text1 // // // text2 // // // // // // text 3 etc.
Thanks,
Asia
Not my best work. But here the workflow. I have nested multiple(like a lot) replace to replace // // to //.
Output:
Hope this helps 🙂
If this post helps you please mark it as solution. And give a like if you dont mind 😀👍