A regular expression assistant

Although there's no doubt that regular expressions are incredibly useful, they also easily get out of hand when trying to match complex strings. Furthermore, anything past twelve or so characters gets hard to read and understand, which is a common source of bugs.

To work around this problem, I suggest you use an online site such as Regex101.com, which helps you check your regular expressions are correct by visually highlighting strings that match. It's fully compatible with all the options shown here, including string replacement, and can even break down a regex and describe it in plain English.

 

Next chapter: Checking whether a function is available >>

Previous chapter: Regular expression syntax examples

Jump to:

 

Home: Table of Contents

Copyright ©2015 Paul Hudson. Follow me: @twostraws.