I know that java regex does not support varying length look-behinds, and that the following should cause an error
(?<=(not exceeding|no((\\\\w|\\\\s)*)mor
That is indeed strange. I don't find explanation but problem seems to disappear if you change (\\w|\\s){0,30}
to [\\w\\s]{0,30}
Pattern.compile("(?<=(not exceeding|no([\\w\\s]{0,30})more than))xxxx");
//BTW you don't need ^-----------------------------------------^ these parenthesis
//unless you want to use match from this group later