General questions about using TextPad
Moderators: AmigoJack , bbadmin , helios , Bob Hansen , MudGuard
Kevin
Posts: 28 Joined: Tue Apr 01, 2003 7:55 pm
Post
by Kevin » Thu Sep 07, 2006 4:34 pm
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
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?
MudGuard
Posts: 1295 Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:
Post
by MudGuard » Thu Sep 07, 2006 7:18 pm
what does the output of your grep look like exactly?
According to your regex, it should be
(123): whatever
Kevin
Posts: 28 Joined: Tue Apr 01, 2003 7:55 pm
Post
by Kevin » Thu Sep 07, 2006 7:48 pm
I changed the regex to match to:
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.
MudGuard
Posts: 1295 Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:
Post
by MudGuard » Thu Sep 07, 2006 9:05 pm
^([0-9]+):
with 1 for line should do the trick (though I am not sure because the file name is missing, but try it ...
Kevin
Posts: 28 Joined: Tue Apr 01, 2003 7:55 pm
Post
by Kevin » Fri Sep 08, 2006 4:57 pm
Thanks Mud. Works great now.