My Text include
Name, Person ID, Company name, User ID
Amit trivedi, 12345678, Capgemini A/S, (54623)
To get those value out I’m using REGEX –
(.*),(.*),(.*),(.*)
and it gives me 4 value out as I have 4 time Comma in between which seperates things… Result is:
on groups 1 : Amit trivedi
on groups 2 : 12345678
on groups 3: Capgemini A/S,
on groups 4: (54623)
(And its works perfect in 90% cases)
But I got some data where company name is long and include an ekstra comma “,” like
Name, Person ID, Company name, User ID
Rajesh Rathoad, 12389678, Perpetual Income, Growth Investment Trust PLC, (54623)
What my RegEx did, it took first two value in one regex result and rest divided as normal.
like it gave me
on groups 1 : Rajesh Rathoad, 12389678
on groups 2 : Perpetual Income
on groups 3: Growth Investment Trust PLC
on groups 4: (54623)
As my data always have same kind of text like
Name, Person ID, Company Name, User ID
How can I be sure that I wont get regex issue, if my Text changes from long to small or small to long company name with one or many comma’s.
can someone help…