REGEX help
- 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
I'm trying to get the desired results...see excel sample...
I'm using the RegEx tool...with the expression [^_]+ and output method tokenize...it's close, but since the raw data is inconsistent, I'm not getting the desired result 100% of the time...
Any suggestions from the REGEX experts?
Thanks!
Solved! Go to Solution.
- Labels:
- Regex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey John,
Since it's always a number followed by an underscore, how about using Parse in the Regex tool and using the pattern: _(\d+)
I think this should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I like where you were going with your solution, but the incoming data contains records with a bonus space.
EXPTAS-201708-P-Scrappy Benefit Upgrade Launch_ 27708_x
Should you want to catch these using the Parse, you'll end up needing to modify the expression as:
_\s?(\d+)
This means: I want to create a group of digits that is preceded by a dash with 0 or 1 spaces after it.
Cheers,
Mark
Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks everybody! appreciate it...that did it...
Regards,
John