Hello,
I'm coding in java jdk 1.3.1_11, mainly because there won't be an upgrade to a newer version.
The regexp that I'm using is ".*((?i)r(echt)?b(\.|ank)?\s(den\shaag|.{1,3}gravenhage))"*
The code is:
public static void main(String[] args) {
try {
String value= "rechtbank den haag";
org.apache.regexp.RE rexp = new org.apache.regexp.RE(".*((?i)r(echt)?b(\\.|ank)?\\s(den\\shaag|.{1,3}gravenhage))");
rexp.match(value);
} catch (Exception e) {
e.printStackTrace();
}
}
However when I'm running this program is gives and error:
org.apache.regexp.RESyntaxException: Syntax error: Missing operand to closure
at org.apache.regexp.RECompiler.syntaxError(Unknown Source)
at org.apache.regexp.RECompiler.terminal(Unknown Source)
at org.apache.regexp.RECompiler.closure(Unknown Source)
at org.apache.regexp.RECompiler.branch(Unknown Source)
at org.apache.regexp.RECompiler.expr(Unknown Source)
at org.apache.regexp.RECompiler.terminal(Unknown Source)
at org.apache.regexp.RECompiler.closure(Unknown Source)
at org.apache.regexp.RECompiler.branch(Unknown Source)
at org.apache.regexp.RECompiler.expr(Unknown Source)
at org.apache.regexp.RECompiler.compile(Unknown Source)
at org.apache.regexp.RE.<init>(Unknown Source)
at org.apache.regexp.RE.<init>(Unknown Source)
at main(test.java:4)
Can anybody help me with this?