Hello,
I need an advice how to approach the RegEx tool as it works in the exact opposite of what I need.
I have the column that contains control ID, but also a lot of comments which are before and after the ID. The id is always build like "CTRL-XXXXXXXXXX", where in the place of Xs there are always 10 digits.
I've used the regex generator, as I'm not that familiar with writing this by myself and I've tried both simplified one "CTRL-\b\d{9}\b" as well as the really rendundant one "CTRL-\d\d\d\d\d\d\d\d\d".
Both seemed to work as it catches the whole ID from the column, but as the output I receive everything beside the CTRL ID, so it's simply get trimmed from the value, is there any way to make it work in the opposite?
Thanks
Solved! Go to Solution.
@Tomekt_ one way of doing this
Try this if you're using the RegEx tool:
^.*(CTRL-\d{10}).*$
If you are selecting the Replace option in the tool then put $1 in the replace with box
The screenshot is from a website called RegEx 101. I find it useful to test things in there instead of running workflows over and over until I get it right.
Thank you both, I managed this to work with your help, also I was struggling as I wasn't aware that in the regex tool the expression needs to be in the brackets.