Regex to match compilation error displayed in several lines

General questions about using TextPad

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

Post Reply
User avatar
rsperberg
Posts: 35
Joined: Thu Jul 29, 2004 2:26 pm
Location: NJ

Regex to match compilation error displayed in several lines

Post by rsperberg »

In searching the forum, it appears I am not the first to discover that the regex I've written to match a multi-line compiler error message does not enable me to jump to the line with the error.

That is, this regex:
^URL: file:///([A-Z]:.+)\/(.+)\nLine:( *)([0-9]+)\nColumn: ([0-9]+)$
is designed for an error message along these lines:
Error occurred while parsing document.
Code: 0xc00ce504
URL: file:///C:/Documents%20and%20Settings/sperbergr/My%20Documents/test/a-file.xml
Line: 300
Column: 25
A name was started with an invalid character.
Double-clicking the third line jumps me to the right file (with another tool, the full path worked; here, for some reason I can only get it to work if I supply just the file name, sans path). But I'm brought only to the first column on the first line, not to the right line.

(The registers are set to file:2, line:4, column:5.)

I haven't been able to discover any definitive statement -- neither "this is how to do this" nor "sorry, it can't be done."

Anyone able to say for certain one way or the other?

Thanks,

Roger Sperberg
BenjaminB
Posts: 10
Joined: Tue Sep 12, 2006 3:09 pm

Post by BenjaminB »

Just an idea: Maybe it is possible to write a Macro using the Goto Function? ([Ctrl]+[G])?
Post Reply