-
1
- #1
Hi --
I am having a terrible time trying to get a regular expression defined to split a string that will look like the following . . .
The RegEx Pattern I've come up with is . . .
I only ever want one group on each side of the delimeter. I seem to be getting results that look like . . .
So, why am I getting the line beginning and line end (array elements 0 and 4). And, how can I fix my regex pattern so I don't get these returned?
THANK YOU!
Stay Cool Ya'll!
-- Kristin
I am having a terrible time trying to get a regular expression defined to split a string that will look like the following . . .
Code:
SQL12345,54321SQL
XXXXX,XXXXX
Where X = [0-9A-Za-z] and can be repeated one or more times on each side of the delimeter (,).
The RegEx Pattern I've come up with is . . .
Code:
"([0-9A-Za-z]+)(,)([0-9A-Za-z]+)"
I only ever want one group on each side of the delimeter. I seem to be getting results that look like . . .
Code:
myStrArr[0] = ""
myStrArr[1] = "SQL12345"
myStrArr[2] = ","
myStrArr[3] = "54321SQL"
myStrArr[4] = ""
So, why am I getting the line beginning and line end (array elements 0 and 4). And, how can I fix my regex pattern so I don't get these returned?
THANK YOU!
Stay Cool Ya'll!
-- Kristin