Rwegex Java

String regex, str;

boolean doesMatch = Pattern.compile(regex).matcher(str).matches();
simondoesstuff