E
Ersin Er
Hi,
I'm a Java programmer but I think my questions applies Perl also while
Regular Expressions in Java are almost Perl compatible.
Say, I have a regexp like (\d)(?:,(\d))* which recognizes inputs like
"1", "0,4", "9,2,0", etc. What I want is to get all captured strings
from group 3 (and also the one from group 1). When the operation has
finished group 3 has only the last captured text which is the last
digit for this case. However I want to get all digits matched by group
1 and 3.
You may advise to use splitting but it does not work for more complex
examples where terminators are also included in the subgroups several
times.
Any suggestions?
Thanks in advance.
-- Ersin
I'm a Java programmer but I think my questions applies Perl also while
Regular Expressions in Java are almost Perl compatible.
Say, I have a regexp like (\d)(?:,(\d))* which recognizes inputs like
"1", "0,4", "9,2,0", etc. What I want is to get all captured strings
from group 3 (and also the one from group 1). When the operation has
finished group 3 has only the last captured text which is the last
digit for this case. However I want to get all digits matched by group
1 and 3.
You may advise to use splitting but it does not work for more complex
examples where terminators are also included in the subgroups several
times.
Any suggestions?
Thanks in advance.
-- Ersin