SOLVED
Regex
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Alteryx_user_123456
6 - Meteoroid
‎01-11-2024
07:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi All,
I'm trying to create a Regex that will pick out only required information from a text string. Running into trouble setting it up, appreciate any help from the community.
Below are some sample texts to parse, essentially I want to extract just the "CON-1234567" information in a separate column.
CON-1234567 abc testing site
con-1234567 abc testing site
abc testing site CON-1234567
abc testing CON-1234567 site
CON-1234567_abc testing site
Thanks in advance!
Solved! Go to Solution.
4 REPLIES 4
nagakavyasri
12 - Quasar
‎01-11-2024
08:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
flying008
15 - Aurora
‎01-11-2024
09:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
FYI.
(?:^|\s)(\w+-\d+)(?=\s|_|$)
2- By use formula of regex:
REGEX_Replace([Txt], '^[[:alpha:]\s]*?(\w+-\d+)[\s_]*?.*$', '$1')
grazitti_sapna
17 - Castor
‎01-12-2024
12:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I have made Workflow for your Problem. Please Check.
If it works Kindly accept it as Solution.
Thanks
Sapna Gupta
‎01-21-2024
09:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you, this worked well!
![](/skins/images/72080B1993C0EC7A53569ADF25905C2F/responsive_peak/images/icon_anonymous_message.png)