I need to use a regex to start matching in one string and end matching in another string. For example, given a regex:
[A-Z]+[0-9]+
and two strings:
String s1 = "aaaABC";
String s2 = "1245aaa";
It should be possible to do as follows:
regex.feed(s1); // returns the start of the match at 3 and end at 5
regex.feed(s2); // returns continuation of the match at 0 and end at 4
Concatenation of the two strings can't be done.
Any ready-made libraries to do that? Any ideas on how to make one myself?