I need to find digits between "," and ","in all text.
I dont want to use .split() and want to do it with regexp.
I can easily get all matches with something like that:
Pattern.compile(",?(\\d+),")
The question is, can I get only second(or third, or forth) match?
I dont need to parse all text, I’d like to stop after N matches.
Is it possible?
Here is an example on how to get the 5th match:
Adapt it to your needs