Find in files to edit window without the file names

Find, replace, find in files, replace in files, regular expressions

Find in files to edit window without the file names

Postby hamilton » Thu Jul 28, 2005 11:36 am

I have a small problem that I cant figure out how to solve, hope somone can help me :?
I want to search in files and get the result to "edit window", so far so good. A new file opens and the result is listed perfectly. But, I don't want the file name to show in the start of every line!
Is there an option that I can choose so I only get listed what I actually searched for,and nothing else :?:
User avatar
hamilton
Basic User
Basic User
 
Posts: 10
Joined: Wed Jul 27, 2005 11:00 pm

Re: Find in files to edit window without the file names

Postby Mofi » Thu Jul 28, 2005 11:59 am

No option! Here is my macro, which deletes everything except the lines where the text was found.

InsertMode
ColumnModeOff
HexOff
UnixReOff
Top
Find RegExp "%----------------------------------------^p"
Replace All ""
Find RegExp "%Find * :^p"
Replace All ""
Find RegExp "%Found * time(s).^p"
Replace All ""

Find RegExp "%*/[0-9]+: "
Replace All ""
Find RegExp "%Search complete, found*^p"
Replace All ""

UnixReOn

Remove the last red command, if you use regular expression in UltraEdit style by default instead of Unix style.

Remove the green lines, if you only want to remove the filename with the line number at start of each line.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4055
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Find in files to edit window without the file names

Postby mrainey56 » Thu Jul 28, 2005 12:10 pm

Try this macro on your search results. It leaves the line number. If not exactly as you want, at least it should give you some ideas.

InsertMode
ColumnModeOff
HexOff
UnixReOn
Top
Find RegExp "^[A-Z][:].*[/](.*)$"
Replace All "\1"
User avatar
mrainey56
Master
Master
 
Posts: 212
Joined: Tue Jul 27, 2004 11:00 pm
Location: Spartanburg, South Carolina

Re: Find in files to edit window without the file names

Postby hamilton » Thu Jul 28, 2005 1:44 pm

Thank you :D This is what I needed
User avatar
hamilton
Basic User
Basic User
 
Posts: 10
Joined: Wed Jul 27, 2005 11:00 pm


Return to Find/Replace/Regular Expressions