Search for a tool
Regular Expression Simplificator

Tool to simplify a regex. Regexp simplificator (or regular expression) shortens the string of characters to search for patterns in a text.

Results

Regular Expression Simplificator -

Tag(s) : Data processing

dCode and you

dCode is free and its tools are a valuable help in games, puzzles and problems to solve every day!
You have a problem, an idea for a project, a specific need and dCode can not (yet) help you? You need custom development? Contact-me!


Team dCode read all messages and answer them if you leave an email (not published). It is thanks to you that dCode has the best Regular Expression Simplificator tool. Thank you.

Regular Expression Simplificator

Sponsored ads

This script has been updated, please report any problems.

Regular Expressions Simplification


Tool to simplify a regex. Regexp simplificator (or regular expression) shortens the string of characters to search for patterns in a text.

Answers to Questions

How does the regexp minification works ?

The regular expressions simplifier replaces useless elements in a regular expression in order to minimize it or make it more readable by analyzing patterns component of the regex string.

Example: x{0,} is equivalent to x*

Example: [aaabbb] is equivalent to [ab]

Example: (ab|ac) can also be written a[bc]

Some regular expressions can not be simplified. In this case, the program will return the same string.

The program is in beta test, and does not work all the times! More, some parentheses, potentially useful for capturing can be deleted and escape characters can be ignored.

How to reduce the size of a regexp?

There are shorthand character classes:

abbreviationequivalent
\d[0-9]
\w[A-Za-z0-9_]
\s[ \t\r\n\f]
\D[^\d]
\W[^\w]
\S[^\s]

The letter d for digit (digit), w for word (letter / alphanumetic character) and s for space (spacing), uppercase letters represent the negation of the set

Example: D for a character that is not a number, etc.

Ask a new question

Source code

dCode retains ownership of the source code of the script Regular Expression Simplificator online. Except explicit open source licence (indicated Creative Commons / free), any algorithm, applet, snippet, software (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt, encrypt, decipher, cipher, decode, code, translate) written in any informatic langauge (PHP, Java, C#, Python, Javascript, Matlab, etc.) which dCode owns rights will not be given for free. So if you need to download the online Regular Expression Simplificator script for offline use, check contact page !

Questions / Comments


Team dCode read all messages and answer them if you leave an email (not published). It is thanks to you that dCode has the best Regular Expression Simplificator tool. Thank you.


Source : https://www.dcode.fr/regular-expression-simplificator
© 2018 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaches. dCode