Match match(Regex x, String str)
Arguments
x: A compiled regular expressionstr: The String to match
Usage
Attempt to match a compiled regular expression to a string, returning a Match object.
r = compile("s$");
s1 = "sausages";
m1 = match(r,s1); // matches(["s"],"sausage","")
s2 = "a sausage";
m2 = match(r,s2); // noMatch
str may be a Tainted string, and the strings in the Match object will not be tainted.