From f3bd7224a2a49befdc940fb6762c3628d4a40a65 Mon Sep 17 00:00:00 2001 From: "Denis Kuzmin [ GitHub/3F ]" Date: Mon, 10 Aug 2020 19:07:44 +0300 Subject: [PATCH] Public release. regXwild 1.3 * NEW: Quantifiers are now standardized as follows: https://github.com/3F/regXwild#-quantifiers regex | regXwild | n ----------------|------------|--------- .\* | \* | 0+ .+ | + | 1+ .? | ? | 0; 1 .{1} | # | 1 .{2} | ## | 2 .{2, } | ++ | 2+ .{0, 2} | ?? | 0 - 2 .{2, 4} | ++?? | 2 - 4 (?:.{2}\|.{4}) | ##?? | 2; 4 .{3, 4} | +++? | 3 - 4 (?:.{1}\|.{3}) | #?? | 1; 3 * NEW: Second-order Quantifiers. Added support for `++` regex equivalent `.{n, }` * NEW: Quantifiers. Implemented `++??` support for ranges. Part of PR #7. ``` {n, m} where n > 0 and m > n n == + m == ? ``` * `++??` (2 - 4) * `+???` (1 - 4) * `+++?` (3 - 4) * `+?` (1 - 2) etc. See unit-tests. * NEW: Quantifiers. Implemented `##??` support for ranges. Part of PR #7. ``` {n, m} where n > 0 and m > n n == # m == ? ``` * `##??` (2 | 4) * `#???` (1 | 4) * `###?` (3 | 4) * `#?` (1 | 2) etc. See unit-tests. * FIXED: Fixed rewind in MS-split `|` like for '##'|'####' * FIXED: Fixed errors in second order quantifiers: `?? == .{0, 2}` and `## == .{2}` For example: * False positive matching `[1####_of` for `TV_[11_of_24]` * Crashed `number = '????';` for `number = '123';` * and related. * CHANGED: API versionString() marked as obsolete due to RXWVersion. --- .version | 2 +- Readme.md | 16 ++++++----- changelog.txt | 61 ++++++++++++++++++++++++++++++++++++++++ regXwild.nuspec | 8 +++--- regXwild/RXWVersion.h | 4 +-- regXwild/regXwildAPI.cpp | 2 +- 6 files changed, 78 insertions(+), 15 deletions(-) diff --git a/.version b/.version index 867e524..589268e 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -1.2.0 \ No newline at end of file +1.3.0 \ No newline at end of file diff --git a/Readme.md b/Readme.md index 62bbc59..870538e 100644 --- a/Readme.md +++ b/Readme.md @@ -1,9 +1,9 @@ # [regXwild](https://github.com/3F/regXwild) -Small and super Fast Advanced wildcards! `*`,`|`,`?`,`^`,`$`,`+`,`#`,`>` in addition to slow regex engines and more. +Small and super Fast Advanced wildcards! `*`,`|`,`?`,`^`,`$`,`+`,`#`,`>`,[`++??`](https://github.com/3F/regXwild/pull/7),[`##??`](https://github.com/3F/regXwild/pull/7) in addition to slow regex engines and more. -Unique algorithms that was implemented on native unmanaged C++ but easily accessible also in .NET through **[Conari](https://github.com/3F/Conari)** (recommended due to caching of 0x29 opcodes and other related optimization). +Unique algorithms that was implemented on native unmanaged C++ but easily accessible in .NET through **[Conari](https://github.com/3F/Conari)** (recommended due to caching of 0x29 opcodes + related optimizations), and others such as [python](https://github.com/3F/regXwild/issues/6) etc. [![Build status](https://ci.appveyor.com/api/projects/status/8knio1ggle0o8ugh/branch/master?svg=true)](https://ci.appveyor.com/project/3Fs/regxwild-github/branch/master) [![release](https://img.shields.io/github/v/release/3F/regXwild)](https://github.com/3F/regXwild/releases/latest) @@ -16,8 +16,8 @@ Unique algorithms that was implemented on native unmanaged C++ but easily access Samples [⏯](regXwildTest/EssSamplesTest.cpp) | regXwild filter | n ----------------------|----------------------|--------- number = '1271'; | number = '????'; | 0 - 4 -year = '2020'; | '##'\|'####' | 2; 4 -year = '20'; | = '##??' | 2; 4 +year = '2020'; | '##'\|'####' | 2 \| 4 +year = '20'; | = '##??' | 2 \| 4 number = 888; | number = +??; | 1 - 3 @@ -86,19 +86,21 @@ metasymbol | meaning ### 🧮 Quantifiers +1.3+ [`++??`](https://github.com/3F/regXwild/pull/7); [`##??`](https://github.com/3F/regXwild/pull/7) + regex | regXwild | n ----------------|------------|--------- .\* | \* | 0+ .+ | + | 1+ -.? | ? | 0; 1 +.? | ? | 0 \| 1 .{1} | # | 1 .{2} | ## | 2 .{2, } | ++ | 2+ .{0, 2} | ?? | 0 - 2 .{2, 4} | ++?? | 2 - 4 -(?:.{2}\|.{4}) | ##?? | 2; 4 +(?:.{2}\|.{4}) | ##?? | 2 \| 4 .{3, 4} | +++? | 3 - 4 -(?:.{1}\|.{3}) | #?? | 1; 3 +(?:.{1}\|.{3}) | #?? | 1 \| 3 and similar ... diff --git a/changelog.txt b/changelog.txt index 6e85ced..54323e7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,67 @@ regXwild - https://github.com/3F/regXwild - - - - - - - - - - - - - - - - - - - - - +[v1.3] 2020.08.10 + + * NEW: Quantifiers are now standardized as follows: + https://github.com/3F/regXwild#-quantifiers + + regex | regXwild | n + ----------------|------------|--------- + .\* | \* | 0+ + .+ | + | 1+ + .? | ? | 0; 1 + .{1} | # | 1 + .{2} | ## | 2 + .{2, } | ++ | 2+ + .{0, 2} | ?? | 0 - 2 + .{2, 4} | ++?? | 2 - 4 + (?:.{2}\|.{4}) | ##?? | 2; 4 + .{3, 4} | +++? | 3 - 4 + (?:.{1}\|.{3}) | #?? | 1; 3 + + * NEW: Second-order Quantifiers. Added support for `++` + regex equivalent `.{n, }` + + * NEW: Quantifiers. Implemented `++??` support for ranges. Part of PR #7. + ``` + {n, m} where n > 0 and m > n + + n == + + m == ? + ``` + * `++??` (2 - 4) + * `+???` (1 - 4) + * `+++?` (3 - 4) + * `+?` (1 - 2) + + etc. See unit-tests. + + * NEW: Quantifiers. Implemented `##??` support for ranges. Part of PR #7. + ``` + {n, m} where n > 0 and m > n + + n == # + m == ? + ``` + * `##??` (2 | 4) + * `#???` (1 | 4) + * `###?` (3 | 4) + * `#?` (1 | 2) + + etc. See unit-tests. + + * FIXED: Fixed rewind in MS-split `|` like for '##'|'####' + + * FIXED: Fixed errors in second order quantifiers: `?? == .{0, 2}` and `## == .{2}` + For example: + * False positive matching `[1####_of` for `TV_[11_of_24]` + * Crashed `number = '????';` for `number = '123';` + * and related. + + * CHANGED: API versionString() marked as obsolete due to RXWVersion. + + [v1.2] 2020.02.10 * NEW: MultiByte support. diff --git a/regXwild.nuspec b/regXwild.nuspec index e50d09a..87662a1 100644 --- a/regXwild.nuspec +++ b/regXwild.nuspec @@ -11,10 +11,10 @@ https://github.com/3F/regXwild false - Small and super Fast Advanced wildcards! `*,|,?,^,$,+,#,>` in addition to slow regex engines and more. + Small and super Fast Advanced wildcards! `*,|,?,^,$,+,#,>,++??,##??` in addition to slow regex engines and more. - Unique algorithms that was implemented on native unmanaged C++ but easily accessible also in .NET - through Conari (recommended due to caching of 0x29 opcodes and other related optimization). + Unique algorithms that was implemented on native unmanaged C++ but easily accessible in .NET + through Conari (recommended due to caching of 0x29 opcodes + related optimizations) etc. Samples [⏯](run) | regXwild filter | n ----------------------|----------------------|--------- @@ -121,7 +121,7 @@ ================== https://github.com/3F/GetNuTool {build-info} - Small and super Fast advanced wildcards! `*,|,?,^,$,+,#,>` in addition to slow regex engines and more. https://github.com/3F/regXwild + Small and super Fast advanced wildcards! `*,|,?,^,$,+,#,>,++??,##??` in addition to slow regex engines and... https://github.com/3F/regXwild wildcards advanced-wildcards fast-wildcards fast-regex extended-wildcards strings text filter search matching search-in-text regex glob filters powerful-wildcards regexp cpp c dotnet dotnetcore csharp Conari regXwild native changelog: https://github.com/3F/regXwild/blob/master/changelog.txt Copyright (c) 2013-2014, 2016-2017, 2020 Denis Kuzmin < x-3F@outlook.com > GitHub/3F diff --git a/regXwild/RXWVersion.h b/regXwild/RXWVersion.h index d45a395..f01a8e1 100644 --- a/regXwild/RXWVersion.h +++ b/regXwild/RXWVersion.h @@ -18,12 +18,12 @@ namespace net { namespace r_eg { namespace regXwild TNum(int major, int minor, int patch, int build = 0) : major(major), minor(minor), patch(patch), build(build) { } - TNum() : TNum(1, 2, 0, 0) { } + TNum() : TNum(1, 3, 0, 0) { } } number; const TCHAR* bSha1 = _T(""); const TCHAR* config = _T(""); - const TCHAR* product = _T("1.2.0"); + const TCHAR* product = _T("1.3.0"); }; }}} diff --git a/regXwild/regXwildAPI.cpp b/regXwild/regXwildAPI.cpp index 572f25a..b3e8a6b 100644 --- a/regXwild/regXwildAPI.cpp +++ b/regXwild/regXwildAPI.cpp @@ -69,7 +69,7 @@ namespace net { namespace r_eg { namespace regXwild */ REGXWILD_API const TCHAR* versionString() { - return /*vsSBE*/_T("1.2.0"); + return /*vsSBE*/_T("1.3.0"); } }}} \ No newline at end of file