Regular expression in macro doesn't work
Submitted by on Tuesday, 23 December, 2003 - 23:48
Hi,
Macros like below
>>>>
Pattern p = Pattern.compile("*.\(([0-9]+)\).*");
lineText = textArea.getLineText(line);
Matcher m = p.matcher(lineText);
>>>>
or
>>>>
gnu.regexp.RE re = new gnu.regexp.RE("^(\*.)\\t(\*.)\\t(\*.)$");
lineText = textArea.getLineText(line);
gnu.regexp.REMatch match = re.getMatch(lineText);
lineText = "<1>=" + match.toString(1) + "<2>=" +
match.toString(2) + "<3>=" + match.toString(3);
>>>>
don't work. Parsing fails on both. Does it mean I can't use any regular expressions in macros or am I doing something wrong?
Stan Berka

