A
Ahmad A. Rahman
Hi all,
I have a problem constructing a regular expression using .net.
I have a string, separated with comma, and I want to group the string
together but, I failed to group a numeric character with decimal values.
Example string : 1, 2.3, "two"," three"
So, I want to group this string into 4 groups (1), (2.3), (two) and (three)
The best regular expression that I have so far is:
(?:^|\s*\,\s*)((?:"(?<SubString>(?:""|[^"])*)")+)|((?<SubString>(\d))+)
But this regex will return (1), (2), (3), (two) and (three).
So, what is the right regular expression to do this? Please help.
Thanks.
I have a problem constructing a regular expression using .net.
I have a string, separated with comma, and I want to group the string
together but, I failed to group a numeric character with decimal values.
Example string : 1, 2.3, "two"," three"
So, I want to group this string into 4 groups (1), (2.3), (two) and (three)
The best regular expression that I have so far is:
(?:^|\s*\,\s*)((?:"(?<SubString>(?:""|[^"])*)")+)|((?<SubString>(\d))+)
But this regex will return (1), (2), (3), (two) and (three).
So, what is the right regular expression to do this? Please help.
Thanks.