RegEx tool
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Labels:
- Apps
- Interface Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Tomekt_ one way of doing this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
