|
||||||||
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
@James: You can either match() or find() a regexp to/in a String. `match()` returns only true if the whole string is matched by the regexp. `find()` on the other hand matches if there is any substring inside the string matching the regexp. You can convert a valid match()-regexp into a find()-regexp by anchoring it in ^ and $, and vice versa by putting '.*' behind and after the regexp (for single line strings, multiline would be a bit more complicated).
The code in the plugin uses find(), therefore you have to convert the find()-regexp into a match() regexp by anchoring, as you did. Personally, I think match() would have been the 'nicer' solution, but to change that now would break compatibility with previous versions.
So, continue to anchor your regexps (but for the record, you should also append '$').