/** */ LikeExpression(Expression right, String like, int escape) { super(right); StringBuffer regexp = new StringBuffer(like.length() * 2); regexp.append("\\A"); // The beginning of the input for (int i = 0; i < like.length(); i++) { char c = like.charAt(i); if (escape == (0xFFFF & c) && shouldEscapeNext(like, i, c)) { i++; char t = like.charAt(i); regexp.append("\\x"); regexp.append(Integer.toHexString(0xFFFF & t)); } else { append(regexp, c); } } regexp.append("\\z"); // The end of the input likePattern = Pattern.compile(regexp.toString(), Pattern.DOTALL); }
/** */ LikeExpression(Expression right, String like, int escape) { super(right); StringBuffer regexp = new StringBuffer(like.length() * 2); regexp.append("\\A"); // The beginning of the input for (int i = 0; i < like.length(); i++) { char c = like.charAt(i); if (escape == (0xFFFF & c) && shouldEscapeNext(like, i, c)) { i++; char t = like.charAt(i); regexp.append("\\x"); regexp.append(Integer.toHexString(0xFFFF & t)); } else { append(regexp, c); } } regexp.append("\\z"); // The end of the input likePattern = Pattern.compile(regexp.toString(), Pattern.DOTALL); }
/** */ LikeExpression(Expression right, String like, int escape) { super(right); StringBuffer regexp = new StringBuffer(like.length() * 2); regexp.append("\\A"); // The beginning of the input for (int i = 0; i < like.length(); i++) { char c = like.charAt(i); if (escape == (0xFFFF & c) && shouldEscapeNext(like, i, c)) { i++; char t = like.charAt(i); regexp.append("\\x"); regexp.append(Integer.toHexString(0xFFFF & t)); } else { append(regexp, c); } } regexp.append("\\z"); // The end of the input likePattern = Pattern.compile(regexp.toString(), Pattern.DOTALL); }
/** */ LikeExpression(Expression right, String like, int escape) { super(right); StringBuffer regexp = new StringBuffer(like.length() * 2); regexp.append("\\A"); // The beginning of the input for (int i = 0; i < like.length(); i++) { char c = like.charAt(i); if (escape == (0xFFFF & c) && shouldEscapeNext(like, i, c)) { i++; char t = like.charAt(i); regexp.append("\\x"); regexp.append(Integer.toHexString(0xFFFF & t)); } else { append(regexp, c); } } regexp.append("\\z"); // The end of the input likePattern = Pattern.compile(regexp.toString(), Pattern.DOTALL); }
/** */ LikeExpression(Expression right, String like, int escape) { super(right); StringBuffer regexp = new StringBuffer(like.length() * 2); regexp.append("\\A"); // The beginning of the input for (int i = 0; i < like.length(); i++) { char c = like.charAt(i); if (escape == (0xFFFF & c) && shouldEscapeNext(like, i, c)) { i++; char t = like.charAt(i); regexp.append("\\x"); regexp.append(Integer.toHexString(0xFFFF & t)); } else { append(regexp, c); } } regexp.append("\\z"); // The end of the input likePattern = Pattern.compile(regexp.toString(), Pattern.DOTALL); }
/** */ LikeExpression(Expression right, String like, int escape) { super(right); StringBuffer regexp = new StringBuffer(like.length() * 2); regexp.append("\\A"); // The beginning of the input for (int i = 0; i < like.length(); i++) { char c = like.charAt(i); if (escape == (0xFFFF & c) && shouldEscapeNext(like, i, c)) { i++; char t = like.charAt(i); regexp.append("\\x"); regexp.append(Integer.toHexString(0xFFFF & t)); } else { append(regexp, c); } } regexp.append("\\z"); // The end of the input likePattern = Pattern.compile(regexp.toString(), Pattern.DOTALL); }