I have a question about Matcher. If there are two capturing group that can be satisfied, which one will it choose?
Let's say the pattern is (A|AB|B), if matcher is input with "AB", will it satisfy the A group then the B group or the AB group?
-
Did you try this example?. It should be simple enough to test.TheLostMind– TheLostMind2015-02-05 13:23:21 +00:00Commented Feb 5, 2015 at 13:23
-
It matches the first, not the longest. See: stackoverflow.com/questions/4515309/…ᴇʟᴇvᴀтᴇ– ᴇʟᴇvᴀтᴇ2015-02-05 13:24:57 +00:00Commented Feb 5, 2015 at 13:24
Add a comment
|