MCPcopy
hub / github.com/arduino/Arduino / match

Method match

arduino-core/src/processing/app/legacy/PApplet.java:477–480  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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);

Callers 4

messageMethod · 0.95
match_hostnameFunction · 0.80
bFunction · 0.80
bFunction · 0.80

Calls 1

findMethod · 0.45

Tested by

no test coverage detected