Search and replace using "or"

General questions about using TextPad

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

Post Reply
C0ppert0p
Posts: 12
Joined: Wed Aug 17, 2011 4:09 pm

Search and replace using "or"

Post by C0ppert0p »

Hi, this has most likely been asked, but I can't phrase the right query to find an answer:
I want to replace, SEND or RECEIVE or ... with \t\t\t\t\t\1
ie insert five tabs in front of any occurrence of multiple patterns
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

With TextPad 7:
Find what: SEND|RECEIVE|whatever
Replace with: \t\t\t\t\t$&

[X] Regular expression
C0ppert0p
Posts: 12
Joined: Wed Aug 17, 2011 4:09 pm

Post by C0ppert0p »

Coolio!
I was playing with:
(RESTORE|SAVE|whatever)(.*$)
/t/t/t/t/t/t/1/2)

Your's is more elegant.
Post Reply