MCPcopy Index your code
hub / github.com/benfry/processing4 / match

Method match

core/src/processing/core/PApplet.java:8538–8550  ·  view source on GitHub ↗

This function is used to apply a regular expression to a piece of text, and return matching groups (elements found inside parentheses) as a String array. If there are no matches, a null value will be returned. If no groups are specified in the regular expression, but the sequence matches, an

(String str, String regexp)

Source from the content-addressed store, hash-verified

8536 * @see PApplet#trim(String)
8537 */
8538 static public String[] match(String str, String regexp) {
8539 Pattern p = matchPattern(regexp);
8540 Matcher m = p.matcher(str);
8541 if (m.find()) {
8542 int count = m.groupCount() + 1;
8543 String[] groups = new String[count];
8544 for (int i = 0; i < count; i++) {
8545 groups[i] = m.group(i);
8546 }
8547 return groups;
8548 }
8549 return null;
8550 }
8551
8552
8553 /**

Callers 8

getShaderTypeMethod · 0.95
PShapeSVGMethod · 0.95
parseSingleTransformMethod · 0.95
matchRowIndexMethod · 0.95
matchRowIndicesMethod · 0.95
findURLMethod · 0.95
compileMethod · 0.95
preprocessMethod · 0.95

Calls 2

matchPatternMethod · 0.95
findMethod · 0.80

Tested by

no test coverage detected