Input : ABC, DEF, GHI, JKL
I would need the output as DEF, GHI, JKL. Basically extract all data after the occurrence of the first comma.
Thanks!
Hi,
use text to column tool after the input, provide delimiter "," and break into rows, use record ID tool, use formula tool where record ID is not equal to 1, use cross tab and unselect the record ID column to get the original structure.
Hi @nithyas ,
There are a couple of ways you can achieve this (maybe more). The most straightforward way is with a text to columns tool, using "," as a delimiter and splitting to 2 columns, leaving extra characters in the last column
Another way would be through RegEx, or a Regular Expression. What you say essentially with the expression below
, (.*)
is that you want to keep everything (whatever is in brackets) after the first comma and whitespace.
There may be more ways, it's up to you to decide which works for your case.
Let me know if you have any questions, hope that helps.
Regards,
Angelos
Hi @AngelosPachis , thanks. Both of these work. But I guess I've run into another issue. We are also seeing data as below -
XYZ, INC.,ABC, DEF,LTD., - In this case, it would split column 2 into INC.,ABC - which is incorrect. Basically, the delimiter is also a comma and the escape character would also be a comma. Is there a way to use it in REGEX?
Thanks!
Hi @nithyas ,
So if your field is
XYZ, INC.,ABC, DEF,LTD.
you want the RegEx to parse out
ABC, DEF,LTD.
Is that correct?