Regex for Ruby errors
Posted: Sat Dec 13, 2008 10:04 pm
Hi everybody!
I'm using Textpad to do some Ruby programming now. I tried to create a regex for parsing errors from the tool-window. I was 2/3 successful, but I need help with the rest.
A possible Ruby error output looks like this:
My regex:
In the first line I get the file in group 1 and the line in group 2, but the following lines move the groups, so file is in 2 and line in 3.
Is there a solution for this?
I'm using Textpad to do some Ruby programming now. I tried to create a regex for parsing errors from the tool-window. I was 2/3 successful, but I need help with the rest.
A possible Ruby error output looks like this:
Getting the error from the first line is no problem, but the 2nd and 3rd is quite tricky.C:/Temp/fxrb/datatarget.rb:71:in `initialize': undefined local variable or method `zontalSeparator' for #<DataTargetWindow:0x3c03bc4> (NameError)
from C:/Temp/fxrb/datatarget.rb:176:in `new'
from C:/Temp/fxrb/datatarget.rb:176
My regex:
Code: Select all
^\(\(\tfrom \)?[^\.]*\.rbw?\):\([0-9]+\)Is there a solution for this?