Java Pattern print capturing groups
问题 ((\d{1,2})/(\d{1,2})/(\d{2,4})) Is there a way to retrieve a list of all the capture groups with the Pattern object. I debugged the object and all it says is how many groups there are (5). I need to retrieve a list of the following capture groups. Example of output: 0 ((\d{1,2})/(\d{1,2})/(\d{2,4})) 1 (\d{2})/(\d{2})/(\d{4}) 2 \d{2} 3 \d{2} 4 \d{4} Update: I am not necessarily asking if a regular expression exists, but that would be most favorable. So far I have created a rudimentary parser