pattern matching in gvim text editor, help needed

Status
Not open for further replies.

anoop12

Member level 5
Joined
Nov 29, 2006
Messages
89
Helped
6
Reputation
12
Reaction score
3
Trophy points
1,288
Activity points
1,867
Hi,

I have a file having filenames. The files contains names ending with .c and .csh .
When I search for .c pattern using "/" in gvim, the .c pattern in .csh is also getting selected. I have to filterout only .c file names. Can anyone help?

Thanks in advance
 

If you have a space after the file it's pretty easy to do: /\.c / This leverages the extra space character.
 

Use the following command at the gvim command prompt.
Code:
:/c\s*$
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…