Regexp problem?

General questions about using TextPad

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

Post Reply
Nial Stewart

Regexp problem?

Post by Nial Stewart »

I'm trying to get a regexp working to extract the file and line number from the
output of a Modelsim VHDL compilation.

An example output line is...

ERROR: C:\PROJECTS\USB_IF\TESTB\TB_USB~1.VHD(152): near "^": expecting: END_

My regexp is

^\(ERROR\|WARNING\):\(.+\)(\([0-9]\))

File = 2
Line = 3

When I double click on this line in the command window I get
"Cannot jump to item under cursor".

Is my regexp wrong (it seems pretty simple), or does Textpad not handle Win98
shortening the long filename to tb_usb~1.vhd?

Thanks for any help,

Nial.
Nial Stewart

Re: Regexp problem?

Post by Nial Stewart »

I've found the problem, I was using the Regexp to extract the path and filename
and all Textpad wanted was the filename.

^\(ERROR\|WARNING\)\(.+\)\(.+\)(\([0-9]+\))

With

File = 3
Line = 4

seems to work.

Nial.
Nial Stewart

correction

Post by Nial Stewart »

I've just tried this again and it didn't work.

parameter: vcom -explicit -work ..\modelsim\work $File

with initial folder: $FileDir


^\(ERROR\|WARNING\)\(.+\)\\\(.+\)(\([0-9]+\))

With File 4, Line 4 seems to do the trick.

Just for (my) future reference.

Nial.
Post Reply