Buy us a beer!

Page Location

The Reeves-Hall Family > Technology > Regular Expressions

Stats

  • Total Stats
    • 160 Posts
    • 536 Tags
    • 1,272 Comments
    • 771 Comment Posters
    • 73 Links
    • 14 Post Categories
    • 11 Link Categories

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=""> <strike> <strong>