Buy us a beer!

Regular Expressions

No, this isn’t about what Tolii and Tosha say to us every evening after being told its bath time!

Instead, its a post to refer you to this excellent tutorial on the computer kind of “regular expressions”, a way of expressing to a computer what to search for.

For example, here’s how to search for an email address using a regular expression:

\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b
  • It describes a series of letters, digits, dots, underscores, percentage signs and hyphens, …
  • followed by an at sign, …
  • followed by another series of letters, digits and hyphens, ..
  • finally followed by a single dot and between two and four letters
  • e.g. “Info@ABC-Corp.com”

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>