O'Reilly logo
  • Arunabha Gupta thinks this is interesting:

Using quantifiers

From

Cover of Mastering Python Regular Expressions

Note

(^[A-Z]?[a-z]{2}?\s+?\d{4}) for identifying dates eg: Jan 1987

More Generic: (\w+ (\d{4})

^-?\d+(,\d+)*(.\d+(e\d+)?)?$

RegEx fr exponential and float numbers

Regex to match first part of email id: \w+[.\w]?(\w+)?

eg: tom.riddle@hortonworks.com will return tom.riddle

This can be further modified to ^([\w.]*)