Mutt:Useful Muttrc Color Regular Expressions

I was working on my muttrc file this morning to make it highlight more stuff and thought I’d share a few of my regexes with the world (not that anyone using mutt wouldn’t likely already know how to do this).

Phone Numbers

I find it useful to have my mail client highlight phone numbers. When you’re late for a meeting you need to dial in to, it’s nice to have the phone number stand out from the rest of the text so you don’t have to hunt around the email for it. Here’s my regex for phone numbers (colors included).

color body brightcyan black "+\?[0-9]{0,2}[ \-]\?[\( ]{0,3}[0-9]{0,3}[\-\. \)]{0,3}[0-9]{3}[\-\. ][0-9]{4}"

In case you don’t want to read through that to figure our what formats of phone numbers that supports, or don’t know regular expressions, here’s a few examples

  • (123)456-7890

  • ( 123 ) 456-7890

  • 123.456.7890

  • 123 456 7890

  • +1 123-456-7890 (up to two digit international numbers)

  • +1 (123) 456-7890

Category:Mail Category:Mutt Category:Linux