Page 1 of 1

Updated RegEx to Match Compilation Errors

Posted: Tue Jun 26, 2001 12:01 pm
by Michael Cesar
Does anyone know how to get Textpad to properly find the filename and line number from ActiveStates new release of perl 5.6.1 build 626? The example in the help...

Expression = ^.+at \(.+\) line \([0-9]+\)[.,]?

does not work because the new output contains the word 'line' twice. The expression above is apparently greedy and matches "\(.+\) line" to the last occurance of 'line'. In Perl I would use the non-greedy operator, however, Textpad doesn't seem to support this.

Any Ideas?

Here is an example of the kind of lines I get from AS Perl now.

Use of uninitialized value in concatenation (.) or string at D:/Perl/lib/IO/Handle.pm line 353, <> line 4

Thanks

Michael Cesar

Re: Updated RegEx to Match Compilation Errors

Posted: Tue Jun 26, 2001 1:02 pm
by Michael Cesar
I forgot to mention that the RegEx still has to match lines like the following also:

Global symbol "$s" requires explicit package name at D:\My Documents\Perl\aivp\pi_select_auth.pm line 658.

So far ...

^.+at \(.+\) line \([0-9]+\)[,.]\(.*line [0-9]\)*

seems to work most of the time.

Michael Cesar