I need a regex that ignores the occurence of certain word inside the input.
The regex works in a normal online regex tester but when I put it in java it doesn't match anymore
input string IGNORE 23 55 21 66 IGNORE 55
Regex: ((IGNORE)*)(\d{2})(.*)
final Pattern p = Pattern.compile( "((IGNORE)*)(\\d{2})(.*)" );
final Matcher m = p.matcher( "IGNORE 23 55 21 66 IGNORE 55" );
final boolean b = m.matches();
System.out.println( "matches = " + b );
The output is false