Butler Bros
asked on
How to capture a particular delimited field using REGEX
Need to capture the "3" value using REGEX in the following string:
"0338829990|10881|188892|E LRET|","", "3","","20 18-08-23T0 9:55:23-04 :00"
"0338829990|10881|188892|E
ASKER
It seems to work.
since the "3" field could be any number, I found that "(\d+)" seems to work.
I know \d matches "any digit"...
but, could you explain a little of why this simple regex works?
Thanks much
since the "3" field could be any number, I found that "(\d+)" seems to work.
I know \d matches "any digit"...
but, could you explain a little of why this simple regex works?
Thanks much
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I actually, didn't properly understand groups and their usage.
thank you
thank you
You're welcome Richard!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
Group1 matches with 3.Or just this?
Open in new window