A
regular expression is a special language for handling texts by applying
a specified rule, also called a regex or regexp for short. In this
article, we are going to show how to handle a trade report with the
RegularExpressions library for MQL5, and will also demonstrate the
optimization results after using it.
They are able to carry out two main functions:
search for a pattern in strings;
replace a pattern found.
When creating patterns for regular expressions, as previously mentioned, special characters, metacharacters and classes (sets) of characters are used. It means a regular expression is a regular string, and all non-special (non-reserved) characters are considered regular.
The search of a specified pattern
in a string is performed by a regular expression handler. In .NET
Framework, and, therefore, in the RegularExpressions library for MQL5,
a regular expression handler backtracks for regular expressions. It is a
variation of a traditional NFA (Nondeterministic Finite Automaton), the
same as those applied in Perl, Python, Emacs and Tcl. It is used to
replace pattern-matches found in a string.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
New article Regular expressions for traders has been published:
A regular expression is a special language for handling texts by applying a specified rule, also called a regex or regexp for short. In this article, we are going to show how to handle a trade report with the RegularExpressions library for MQL5, and will also demonstrate the optimization results after using it.
They are able to carry out two main functions:
When creating patterns for regular expressions, as previously mentioned, special characters, metacharacters and classes (sets) of characters are used. It means a regular expression is a regular string, and all non-special (non-reserved) characters are considered regular.
The search of a specified pattern in a string is performed by a regular expression handler. In .NET Framework, and, therefore, in the RegularExpressions library for MQL5, a regular expression handler backtracks for regular expressions. It is a variation of a traditional NFA (Nondeterministic Finite Automaton), the same as those applied in Perl, Python, Emacs and Tcl. It is used to replace pattern-matches found in a string.
Author: MetaQuotes Software Corp.