Page 1 of 1

Simple replace question

Posted: Mon Jul 08, 2002 5:42 pm
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

Re: Simple replace question

Posted: Tue Jul 09, 2002 4:53 am
by Ed
is Replace
^[^:]+:\(.+\)$
with
\1\.mouse

(Regular exp)
what you're after?

Re: Simple replace question

Posted: Tue Jul 09, 2002 10:56 am
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