Regex - Using wildcards

Created by Chris Black, Modified on Mon, 26 Apr, 2021 at 5:50 PM by Chris Black

Description


A quick guide to using wildcards in regex expressions


Requirements


None. To implement in MPmail you will need an admin login.


Guide


Special characters need to be prefixed to be used literally

Special characters include

.

To treat the following character literally use

\

Meaning of Special characters

. : wildcard, matches any single character
\ : treat next character literally
* matches the PREVIOUS character any number of times

Examples

To match any email address from manageprotect.com

Regex expression:
.*@manageprotect\.com

Explanation:
.* = any text, any length
@manageprotect = literal
\. = treat . as literal
com = literal

To match emails from any person with email prefix 'chris', at any outlook email address (.fr or .com.au for example)

regex expression:

chris.*@outlook\..*

Explanation

chris = literal

.* = any text, any length

@outlook = literal

\. = treat . as literal

.* = any text, any length


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article