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. Except explicit open source licence (indicated Creative Commons / free), the "Regular Expression Analyzer" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "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.) and all data download, script, or API access for "Regular Expression Analyzer" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.
The copy-paste of the page "Regular Expression Analyzer" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
Regular Expression Analyzer on dCode.fr [online website], retrieved on 2024-12-21,