Hi all,
I'm trying to separate the data using regex parse.
Column1
1. ASdfgtchbn123ADFGV8,/djvvjlvi69
2. XDfctyubjn1546
Some part of the data in the input is same in the two records. But, other part in first record is little different. I tried multiple approaches.
I used the below pattern.
([A-Z][a-z]+)(\d+)|([A-Z]+)(\d),/([a-z]+)(\d+)
When I use above pattern then I get the output as above.
If I use the pattern like this ([A-Z][a-z]+)(\d+)([A-Z]+)(\d),/([a-z]+)(\d+) then I get the below output.
How do I get the output data in the two records without disturbing any?
Please help.
Thank you.
Best regards,
teja.
Solved! Go to Solution.
You are missing a backslash before the forward slash.
([A-Za-z]+)(\d+)|([A-Z]+)(\d),\/([a-z]+)(\d+)
@gabrielvilella You don't need to escape a forward slash.
This works for your two records (and probably your two records alone)
([A-Z][a-z]+)(\d+)(?:([A-Z]+)(\d),/([a-z]+)(\d+))?
Note that your examples start with two upper case latters and your expression matches only one: so the output will change when you untick the Case Insensitive.checkbox.