Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Python

r"
(\w+)(?:(?:@)|(?:\s+[Aa][Tt]\s+))(.+)(?:(?:\.edu)|(?:\s+[dD][oO][Tt]\s+edu))
"
g

Description

Spamlord assignment: this regex detects email addresses in text.

Submitted by anonymous - 8 years ago