remove file path and line number from Find in Files results

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
softweave
Posts: 2
Joined: Thu Mar 10, 2011 9:39 pm

remove file path and line number from Find in Files results

Post by softweave »

I would like to remove the file path and line number from the start of each line in the results of a file search.

For example, replace:

C:\goo\foo.java(43): good stuff

with just:

good stuff

Can someone show me how to do this?
Last edited by softweave on Fri Mar 11, 2011 12:49 pm, edited 1 time in total.
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Search | Replace... (<F8>):
Find what: ^.*:_ [Replace the underscore with a space]
Replace with: [nothing]

[X] Regular expression

Replace All
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

if this should happen in the search result window, you have to first switch off the Readonly mode for that window.
softweave
Posts: 2
Joined: Thu Mar 10, 2011 9:39 pm

thanks

Post by softweave »

This is exactly what I needed
Post Reply