Pattern eqPattern = Pattern.compile("(.*?)([a-z0-9\\_\\.]*) eq \"(((\\\\\")|[^\"])*)\"([\\s]*.*)", Pattern.CASE_INSENSITIVE);
This is my regex. When I try to match a long string, I got stack overflow. The pattern will match something like column1 eq "abc" and column ne "abc"; (\\\")|[^\"]): to skip " in inside "". I want to ask how to rewrite this to prevent stack overflow.