Simple replace question

General questions about using TextPad

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

Post Reply
Eric Hoppe

Simple replace question

Post by Eric Hoppe »

All-

Much appreciation for your input on this simple replace question... esp. after seeing some of the other examples while searching through the old threads.

I want to replace this:
dog:cat

with this:
cat.mouse

The words are just examples, of course. Basically, I want to remove the first word and the colon and add the 'dot' and another word.

Thanks!

---ehops
Ed

Re: Simple replace question

Post by Ed »

is Replace
^[^:]+:\(.+\)$
with
\1\.mouse

(Regular exp)
what you're after?
Roy Beatty

Re: Simple replace question

Post by Roy Beatty »

If you need to replace 2 or more instances per line:<br>
dog:cat dog:cat <br>
dog:cat rotweiler:abyssinian<br>
dog:cat gibberish rotweiler:abyssinian

Find...: \<[^: ]+:\(\<[^: ] ]+\>\)<br>
Replace: \1\.mouse
Post Reply