J
joes
Hello
We have unfortunately the siituation that a regular expression could
match mutliple times in a string. Currently it seems that it takes
always the last. I would like to know if this is "guaranteed" or
somewehere specified that it takes "always" the "last" one. I now that
I can use "^" or "$" to specify that more precisely but unfortunately
can not change the expression (no access to the source code).
Does anybody knows more about that?
i.e.
String text = "aaa bbb aaa";
Pattern p = Pattern.compile("aaa");
Matcher m = p.matcher(text);
boolean b = m.matches();
thx
chees
Mark
We have unfortunately the siituation that a regular expression could
match mutliple times in a string. Currently it seems that it takes
always the last. I would like to know if this is "guaranteed" or
somewehere specified that it takes "always" the "last" one. I now that
I can use "^" or "$" to specify that more precisely but unfortunately
can not change the expression (no access to the source code).
Does anybody knows more about that?
i.e.
String text = "aaa bbb aaa";
Pattern p = Pattern.compile("aaa");
Matcher m = p.matcher(text);
boolean b = m.matches();
thx
chees
Mark