"Jump to" Regular expression

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Josh

"Jump to" Regular expression

Post 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!
Roy Beatty

Re: "Jump to" Regular expression

Post by Roy Beatty »

The second regex has an ending colon, the first one does not?
Josh

Re: "Jump to" Regular expression

Post 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?
Post Reply