Page 1 of 1

Delete all characters on a line after a space

Posted: Thu Oct 28, 2010 2:36 am
by silly
Hello, I was looking for a macro or a regular expression that will allow me to delete everything in a line after the first space throughout the document. For example,

email@address.com texttobedeleted
another@emailaddress.com moretexttobedeleted

This would keep the email addresses, or whatever other text that is on the line, but will delete everything that comes after that first space.

Thanks!

Posted: Thu Oct 28, 2010 7:30 am
by ak47wong
In the Replace dialog:

Find what: _.* (replace the underscore with a space)
Replace with: (nothing, or a space if you want to keep the space after the email address)

Ensure the Regular expression check box is selected.

Posted: Thu Oct 28, 2010 6:51 pm
by silly
Thanks for your help!