1 package org.apache.regexp; 2 3 59 60 66 public class REUtil 67 { 68 69 private static final String complexPrefix = "complex:"; 70 71 79 public static RE createRE(String expression, int matchFlags) throws RESyntaxException 80 { 81 if (expression.startsWith(complexPrefix)) 82 { 83 return new RE(expression.substring(complexPrefix.length()), matchFlags); 84 } 85 return new RE(RE.simplePatternToFullRegularExpression(expression), matchFlags); 86 } 87 88 95 public static RE createRE(String expression) throws RESyntaxException 96 { 97 return createRE(expression, RE.MATCH_NORMAL); 98 } 99 } 100 | Popular Tags |