Page 1 of 1

Regular expression to match error ouput

Posted: Thu Jun 27, 2002 9:08 pm
by Linda
Hello,

When I try to compile and double-click on the errors in the "Command Results", it says, "Cannot jump to item under cursor". It does work if just using the stock "Compile Java" menu item from the Tools menu, but compiling from a batch file with a list of commands, .i.e., to put the class files in another directory, it doesn't work.

For example, here is an error line:

.\metadigm\util\PromptDialog.java:810: cannot resolve symbol

and here is the default regular expression copied from "Compile Java"

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

file register 1
line register 4

I tried

^\([^:]*\):\([0-9]+\)

but it didn't work either.

Any ideas?

Thanks!

Linda

Re: Regular expression to match error ouput

Posted: Mon Jul 08, 2002 4:50 pm
by Alan Bellows
I've got the exact same problem, and I haven't been able to track down a solution. Perhaps one of the TextPad developers might chime in?

AB

Re: Regular expression to match error ouput

Posted: Mon Jul 15, 2002 12:37 am
by Jeff Epstein
Try this:

[\]\([a-zA-Z]+.java\):\([0-9]+\):

Where register 1 is the file, and register 2 is the line.

Re: Regular expression to match error ouput

Posted: Mon Jul 15, 2002 12:42 am
by Jeff Epstein
You may want to replace [a-zA-Z] with [a-zA-Z0-9_] if those characters appear in your file names.

Re: Regular expression to match error ouput

Posted: Tue Jul 16, 2002 5:50 pm
by Alan Bellows
Thanks man... I'll try that when I get home and let you know if it works.

AB

Re: Regular expression to match error ouput

Posted: Wed Jul 17, 2002 12:05 am
by Alan Bellows
Well, that one didn't work, but I scabbed this one together, which did work:

^([A-Za-z0-9_-]:[^:]+):([0-9]+):

...Note also that I have Textpad set up for POSIX regular expression syntax.

AB

Re: Regular expression to match error ouput

Posted: Tue Jul 30, 2002 4:35 pm
by Jim Garacci
This is what I use

Regular expression: ^\([^:]*:[^:]*\):\([0-9]+\):

Registers of: File: 1, Line: 2