Page 1 of 1

"Jump to" Regular expression

Posted: Wed May 29, 2002 6:56 pm
by Josh
Why does my reg exp for the jakarta ant build tool not work?

\[javac\] \([[:alpha:]]:[^:]+\):\([[:digit:]]+\)

The only differences I see from the FAQ one...

^[ \t]+\[javac\] \([A-Za-z]:[^:]+\):\([0-9]+\):

...is that I use character classes, I don't check for leading white space, and I don't bother matching the : at the end. But my expression still matches the Filename and LineNum in the Ant output. It just doesn't work as a jump to expression.

Thanks!

Re: "Jump to" Regular expression

Posted: Thu May 30, 2002 2:48 pm
by Roy Beatty
The second regex has an ending colon, the first one does not?

Re: "Jump to" Regular expression

Posted: Thu May 30, 2002 4:36 pm
by Josh
Right, the trailing colon match is one difference. Regardless, my expression still matches the line. Plus, when used as a find and replace with "\1 \2" as the replacement expression it substitutes in those subpatterns properly. So why doesn't it work as a jump to?