PDA

View Full Version : Java RegEx



DBQ
December 19th, 2008, 06:04 AM
I am trying to match a pattern in Java of the form:

((a=b,b=c,d=e.......),(m=s,.....),(...))

ie. this pattern can repeat many times inside () (the a=b part). I am trying to develop a RegEx for this. How do I account for the repetition? It can repeat one times, 0 times, and any number of times.

Thank You.

slavik
December 19th, 2008, 06:38 AM
something like:

"(\((\\w=\\w,?)*\),?)*"

* - 0 or more
? - 0 or 1
+ - 1 or more