Page 1 of 1

grep results not jumping back

Posted: Thu Sep 07, 2006 4:34 pm
by Kevin
I have set up grep to find all locations of a selected word like this:

[x] use POSIX regex syntax
[x] Capture Output

regex to match output

Code: Select all

^\([[:digit:]]+\):
File is blank, Line is 1, Column is blank

These settings will capture what I am grepping for in a Command Results window without any problem. When I double click on a results line, it doesn't jump to the line in my source file.

What am I forgetting to do?

Posted: Thu Sep 07, 2006 7:18 pm
by MudGuard
what does the output of your grep look like exactly?

According to your regex, it should be
(123): whatever

Posted: Thu Sep 07, 2006 7:48 pm
by Kevin
I changed the regex to match to:

Code: Select all

^[0-9]+:
And now my output looks like:

Code: Select all

2:whatever
6:whatever
10:whatever
14:whatever
It will jump back only to the first line of the source, not to the double clicked line. :?:

Posted: Thu Sep 07, 2006 9:05 pm
by MudGuard
^([0-9]+):
with 1 for line should do the trick (though I am not sure because the file name is missing, but try it ...

Posted: Fri Sep 08, 2006 4:57 pm
by Kevin
Thanks Mud. Works great now.