Match a string with a regular expression, and returns the match as an array. The first index is the matching expression, and array elements [1] and higher represent each of the groups (sequences found in parens). This uses multiline matching (Pattern.MULTILINE) and dotall mode (Pattern.DOTALL) by d
(String what, String regexp)
| 475 | * pick up newline characters. |
| 476 | */ |
| 477 | static public String[] match(String what, String regexp) { |
| 478 | Pattern p = Pattern.compile(regexp, Pattern.MULTILINE | Pattern.DOTALL); |
| 479 | return match(what, p); |
| 480 | } |
| 481 | |
| 482 | static public String[] match(String what, Pattern pattern) { |
| 483 | Matcher m = pattern.matcher(what); |
no test coverage detected