Roland Tanglao
About

When to use regexes aka regular expressions

May 21, 2017

Pontifications

  • Use an HTML parser instead of regular expressions
  • Use a parser if you need a parser. Regular expression are not for your Domain Specific Language :-) !
  • Use your language’s built-in string search functions.
  • As a last resort, if you must use regexes, turn off white space significance and comment your regular expressions (and test them on an online regular expression checker or some tool like RegexBuddy).

Leave a comment on github

Roland Tanglao

  • Roland Tanglao
  • roland@rolandtanglao.com
  • rtanglao
  • rtanglao

flickr.com/roland, twitter.com/rtanglao #firefox #thunderbird