How can I parse dataset like this? Any insights is appreciated. Space would not work as a delimiter as Column names itself have spaces one or more in it. TIA
Output desired:
ID Name | Description | Part Number |
123 | CERAMIC CAPACITOR FIXED | 223-405 |
456 | LABEL, MICROWAVE HIGH VOLTAGE | 3100-123 |
Input:
ID Name Description Part Number |
123 CERAMIC CAPACITOR FIXED 223-405 |
456 LABEL, MICROWAVE HIGH VOLTAGE 3100-123 |
Solved! Go to Solution.
Hey @sagarghimire
Here's how I'd parse this data:
We can use RegEx to parse out the data based on the character types used.
(\d+)\s+(\D+?)\s+([\d-]+)
In case you've not used RegEx before, the brackets "()" let use capture bits of text to output in new columns.
\d+ is "one or more digits"
\s+ is "one of more white space characters"
\D+? is "one or more non-digits as few as possible"
[\d-]+ is "one or more of either digits or hyphens.
There's more info on RegEx all over the community, but I'd suggest starting with the example workflow in designer itself.
Hope that helps,
Ollie
Hey @sagarghimire, there's a good few ways to do this but assuming the pattern is always <ID Name><Space><Description (with/without spaces><Space><Part Number> then here's a method using standard string functions: