Tool to analyze a regular expression and understand its interpretation mechanism and extracting internal properties through the analyzer.
Regular Expression Analyzer - dCode
Tag(s) : Data Processing
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The analysis of a regular expression consists in breaking down each element of this one in order to propose a visualization of it a little more intuitive called syntax diagram (often called railroad diagram).
The software of regex analysis decomposes a regular expression in order to find each component (characters, pattern, matches) and describe its meaning. The analysis is based on a cut of the pattern matching expression.
Example: /\d{2,5}/ correspond to \d (digit) {2,5} between 2 and 5 times.
dCode uses the work of takayoshiotake (MIT License) here
The script gets minimum and maximum sizes of each element of the expression and calculates the total.
Example: (ab|cde){2,3} has for minimum length 4 (case abab) and maximum 9 (case cdecdecde)
Example: a+ has for minimal length 1 (case a) and maximal infinite (case aaaaa…a)
Currently dCode can do regular expression searches but no real test feature. To test a regular expression, dCode's advice is to use the site Regex101 here with a Javascript inerface that allow seeing instantly (by underlined characters) detected items or captured in the regular expression.
dCode retains ownership of the "Regular Expression Analyzer" source code. Any algorithm for the "Regular Expression Analyzer" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Regular Expression Analyzer" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Regular Expression Analyzer" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Regular Expression Analyzer" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Regular Expression Analyzer on dCode.fr [online website], retrieved on 2025-04-16,