Hello everyone,
Well, I'm stuck on a regular expression problem. I have a JTextField that is used to enter a range of pages. For example 11-21, 45-49. However I want to use Regex to pull this data as groups. So group one will be 11-21 and two will be 45-49. Lol I've been messing with this regex for about 3 hours and google searching all morning. However I just can't seem to get this to come together. This is what I have so far.
The issue is the comma and the space. I want to match it but exclude from group. I tried look arounds but cant seem to get this going. It matches one group but nothing more than this. As soon as I
test with comma and space m.matches() returns false. Anything will be helpful. Thank you all.