Table of contents
Atlantis Word Processor logo
Atlantis Word Processor
Search


Tip  Did you know that ...


You can create a list of favorite symbols in the Insert Symbol dialog for direct access from this same dialog. Click here for details...
Examples of regular expressions: searching for email addresses

The following regular expressions can be used to search documents for email addresses, or manage mailing lists.

Search for any email address

Paste the following regular expression to the "Find what" box of the Find/Replace panel of the Control Board to match any well-formed email address in your document:

<[^$^#.+\-_]@\@[^$^#.\-]{1,}.^${2,}>

Search for email addresses with digits within local part

<[^$^#.+\-_]{0,}^#[^$^#.+\-_]{0,}\@[^$^#.\-]{1,}.^${2,}>

The above regular expression will match email addresses containing digits within the prefix (to the left of the "@" symbol).

For example:

joeandjane1977@gmail.com
532alonso@yahoo.com.br
pete15@live10.com

Search for email addresses with punctuation signs within local part

<[^$^#]@[.+\-_][^$^#.+\-_]@\@[^$^#.\-]{1,}.^${2,}>

The above regular expression will match email addresses containing periods, "plus" signs, hyphens, or underscores within the prefix (to the left of the "@" symbol).

For example:

wolfgang.limann@web.de
joseph+atlantis@mypublishing.com
billy.van_bonghe@skynet.be

Search for email addresses with specific domains

The following regular expression will match email addresses with the "de" domain:

<[^$^#.+\-_]@\@[^$^#.\-]@.de>

For example:

wolfgang.limann@web.de
willi.kovermann@online.de
peter124512@gmx.de

The following regular expression will match email addresses with the "co.uk" domain:

<[^$^#.+\-_]@\@[^$^#.\-]@.co.uk>

For example:

jack.spinooza@yahoo.co.uk
ali1281-89@hotmail.co.uk
markmark@live.co.uk

Search for email addresses with multilevel domains

The following regular expression will match email addresses with multiple periods within the domain part:

<[^$^#.+\-_]@\@([^$^#\-]@.){2,}^${2,}>

For example:

i.m.alive@bigpond.net.au
zola5401m@yahoo.com.ar
wjeremy@health.bti.go.pl

Search for email addresses with any 'yahoo' domain

The following regular expression will match email addresses containing 'yahoo' as a sub-domain:

<[^$^#.+\-_]@\@yahoo.(^$@.){0,}^${2,}>

For example:

philippe.olenko@yahoo.fr
uamundo@yahoo.com.ar
psychother@yahoo.co.uk

Search for email addresses with any 'yahoo' domain, and change the domain to 'gmail.com'

If you use the following regular expression as a "find what" pattern:

<([^$^#.+\-_]@\@)yahoo.(^$@.){0,}^${2,}>

and the following one as a "replace with" pattern:

\1gmail.com

you could replace 'yahoo' domains within email addresses with "gmail.com'.

For example, the following email addresses:

philippe.olenko@yahoo.fr
uamundo@yahoo.com.ar
psychother@yahoo.co.uk

would be replaced with these ones:

philippe.olenko@gmail.com
uamundo@gmail.com
psychother@gmail.com



Note: Before searching with a regular expression, make sure that the "Use wildcards" option is enabled in the Find/Replace panel of the Control Board:

The 'Use wildcards' option

or in the Find/Replace dialog:

The 'Use wildcards' option

Tip:

  • You can add your commonly used regular expressions to the saved searches.

See also...