search/cut from witch you only know the beginning + end

General questions about using TextPad

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

Post Reply
jan-01
Posts: 19
Joined: Fri Apr 27, 2007 9:40 am

search/cut from witch you only know the beginning + end

Post by jan-01 »

Is it possible to make a search+cut for a text from witch you only know the beginning + end in this case M + f
for instance:

I want to cut 'M META 0658 @ f' + \ 'M META 0812 @ f'

\ M siddarta 23 \ M META 0658 @ f \ M cc 2409 N @ g \ M META 0812 @ f \

after search/cut

\ M siddarta 23 \ \ M cc 2409 N @ g \ \

Thanks in advance.
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

You haven't specified precisely what identifies the strings to be removed.

This works correctly on your example:

Search | Replace... (<F8>):
Find what: _M_[^\]*_f_ [Replace the underscores with spaces]
Replace with: _ [Replace the underscore with a space]

[X] Regular expression

Replace All
So does this:

Search | Replace... (<F8>):
Find what: \\_M_[^\]*_f_\\ [Replace the underscores with spaces]
Replace with: \\_\\ [Replace the underscore with a space]

[X] Regular expression

Replace All
Post Reply