Hi skaemper

You can try this using POSIX:
Search for:
^.*[: :]([-a-zA-Z0-9\._]+@[-a-zA-Z0-9]+(\.[-a-zA-Z0-9]+)*\.(com|edu|org|info|gov|int|mil|biz|net)).*$
Replace with:
\1
=======================
Explanation of Search Regex:
^ .....................=beginning of line anchor
.*.......................=any number of characters
[: :]...................= a space character
(........................=start of first tagged expression
[-a-zA-Z0-9\._]+...=one or more alpha-numberics,hyphen,period,underscore characters
@.........................=@ symbol
[-a-zA-Z0-9]+...........= one or more alpha-numeric characters
(..........................=start of second tagged expression
\. ......................=period
[-a-zA-Z0-9]+............=one or more alpha-numeric characters
)........................= end of second tagged expression
* ......................= any number of previous expression
\. ......................=period
(com|edu|org|info|gov|int|mil|biz|net).....= choice of valid domain extension ID values
)............................=end of first tagged expression
.* ........................=any number of characters
$ ........................=end of line anchor
=======================
Explanation of Replace Regex:
\1.................=first tagged expression:
([-a-zA-Z0-9\._]+@[-a-zA-Z0-9]+(\.[-a-zA-Z0-9]+)*\.(com|edu|org|info|gov|int|mil|biz|net))
=======================
Here are some test lines that I used:
emailname@domain.com. This is at beginning of a sentence, with a space.
This is at the end of a sentence:
emailname@Domain.Com
This email address:
myname@AOL.org is in the middle of the line.
This name has periods in the name:
your.name@myplace.com
And this address:
His-Name@thatplace.edu uses a hyphen
And you may also see underscores:
your_test@mine.ABC.gov
===========================================
This appears to pick up most email names that I have tested (more than shown above), but....
A few cautions:
1. This requires a leading space, so it may be necessary to add a space to the beginning of every line (at least to those where the email address starts at the very beginning. You may be able to do that by replacing "\n" with "\n ". (Quotes are only to show the extra space in the replacement value.
2. You may want to add more extensions to the end of the domain, I don't think this is all-inclusive.
3. You may need to add more punctuation to the group after the leading space [: :], I don't think this is all-inclusive.
4. This will only handle one email address per line because of the line start/end anchors.
WARNING:, this first pass expression will probably miss some valid email addresses. It can use some more work to make it better.
