Quantcast
Channel: Yet Another Math Programming Consultant
Viewing all articles
Browse latest Browse all 809

Regular Expression Tester

$
0
0
On a regular basis (pun intended), I am using regular expressions for simple parsing tasks. Writing or debugging a regular expression is not always super easy. I found that web site [1] is quite helpful to experiment with regular expressions and input strings.

Using the default prce (php) flavor


Groups captured are color coded

The tools supports different flavors (I suspect pcre (php) is the most "standard"). Indeed this version checks out my regexp. However when using the javascript version, I see:

No match with Javascript flavor
With the pcre (php) there is even a debugging tool which explains in detail how the regexp algorithm proceeds:

Debugger


References


  1. Online regex tester and debugger: PHP, PCRE, Python, Golang and JavaScript, https://regex101.com/

Viewing all articles
Browse latest Browse all 809

Trending Articles