REGEX Question
- 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
Hi Community,
I had another issue earlier and was advised to use REGEX, and honestly I'm only very, very basic on this,
I've looked at some YouTube videos to try to learn, and I've found a funny issue, I'm using data I get form people via email, where in excel I'd use a text to columns etc.
Picture below is me trying to use Regex to parse out the data, but when one Item is longer than our usual 8 digits, it's jumping over to the Sales Order Number
We have Item Number's ranging from 3 to 15 characters (Alpha/ Numeric now a days) just to make life more difficult .
Anyway in this example more are 8 digits, but 1 is 11 characters (Alpha/ Numeric) so I'd like to understand how to build the Regex logic using this sample data, to parse all the lines correctly.
Sample Workflow You can see my bad attempt at Regex, and the sample data in a Notepad format.
I'd like in the end to see the Item Number, the Sales Order No, the current Qty, and the new (Reduced Qty) so I can learn
TIA
Karl.
Solved! Go to Solution.
- Labels:
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You have your parse hardcoded for 8 digits - you can change it to any number of word characters (alphanumeric) which come before a space by starting it with:
(\w+)\s
That should extract the Sales Order Number...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Would Getword([field1],6) suffice?
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
In you're case you have to find the correct pattern to split the field:
Hope this helps,
Attached the workflow,
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Messi007,
That works except for Item Number 24073256UCV it's dropping the (UCV) part of the item number.
What would you do in these situations
Field_1 | Item | Sales Order NO | Current QTY | New QTY |
24073256UCV need to reduce in SO 23584456 from 29 to 25 | 24073256 | 23584456 | 29 | 25 |
Regards,
Karl.
- 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
Thanks Messi007, that's amazing man...
Love to know how to do this
but I'II keep trying,
also thanks to everyone else you gave solutions.
Cheers,
Karl.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
