Hello!
I need to remove the portion of the Name that shows "(On Leave)"
Ex. We have a name which may show as Elizabeth Menendez (On Leave), but I would like the name to show as Elizabeth Menendez on the output.
I attached a test WF showing the formula I added to my WF but it's only removing the text "On Leave" and the () parenthesis are still showing.
Can someone please provide a suggestion on how I can remove the entire "(On Leave" portion from each name?
Thanks!
Solved! Go to Solution.
Hey,
So Regular Expressions (RegEx) requires an "escape character" to denote differences in special characters vs commands.
The "\" character is placed before the "(" and ")" to denote that they're not part of the RegEx commands.
I would recommend using the RegEx tool and as follows:
@emenendez2update your formula like below
REGEX_Replace([Primary Contact], "(.*)\(.*", "$1")
Thank you both for your suggestions! I tried both methods and got the correct output showing the name without "(On Leave)".
@npacheco I decided to go with you version, because the method from @binuacs showed a red triangle on the upper right corner of the cell output saying "this contains trailing spaces" and I was not sure what impact that would have.
Both were great, thank you!!
@emenendez2 that is the leading space, use the Trim() function to eliminate the spaces
Trim(REGEX_Replace([Primary Contact], "(.*)\(.*", "$1"))