Page 1 of 1

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

Posted: Thu Feb 02, 2012 6:31 am
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.

Posted: Thu Feb 02, 2012 8:13 am
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