Skip to content

Commit

Permalink
Public release. regXwild 1.4
Browse files Browse the repository at this point in the history
* NEW: Modern `match()` method for ESS implementation with bitwise options:
        ```
        bool match(const tstring& input, const tstring& pattern, const EngineOptions& options, MatchResult* result);
        ```
        Searches an input string for a substring that matches a pattern.
        Use F_ICASE = 0x001 to ignore case sensitivity when matching.

* NEW: Implemented `>c` metasymbol.
       Modern `>` as [^c]*str | [^c]*$

       This is default behavior using match().
       To activate legacy `>` as [^/]*str | [^/]*$ use F_LEGACY_ANYSP = 0x080

* NEW: Implemented F_MATCH_RESULT = 0x002 flag to collect additional data for the MatchResult.
        ```
        EssRxW::MatchResult m;
        rxw.match
        (
            _T("number = '8888'; //TODO: up"),
            _T("'+'"),
            EssRxW::EngineOptions::F_MATCH_RESULT,
            &m
        );
        //m.start = 9
        //m.end = 15
        ```

* NEW: Added `replace()` method for ESS implementation.
        ```
        bool replace(tstring& input, const tstring& pattern, const tstring& replacement, const EngineOptions& options);
        ```
        In a specified input, replaces first substring that match a specified pattern with a specified replacement string.

* NEW: Implemented optional offset for `match()` and `replace()` methods. ESS impl.
        ```
        bool replace(tstring& input, const tstring& pattern, const tstring& replacement, udiff_t offset, const EngineOptions& options)
        bool match(const tstring& input, const tstring& pattern, udiff_t offset, const EngineOptions& options, MatchResult* result)
        ```
        udiff_t offset - The starting position to start matching.

* NEW: Implemented F_MATCH_ALL = 0x004. Do not finish on first match in replace() method.

* NEW: New C-export functions in common.h PE/Invoke or other outside environments.
       ```
        bool replace(TCHAR* input, const TCHAR* pattern, const TCHAR* replacement, flagcfg_t options);
        bool replaceOfs(TCHAR* input, const TCHAR* pattern, const TCHAR* replacement, udiff_t offset, flagcfg_t options);
        bool match(const TCHAR* input, const TCHAR* pattern, flagcfg_t options, EssRxW::MatchResult* result);
        bool matchOfs(const TCHAR* input, const TCHAR* pattern, udiff_t offset, flagcfg_t options, EssRxW::MatchResult* result);
        bool replaceTo(const TCHAR* input, const TCHAR* pattern, const TCHAR* replacement, TCHAR* to, udiff_t offset, flagcfg_t options);
       ```

* FIXED: Fixed SINGLE ms for +++ and `system+` or like.

* FIXED: Fixed END ms `$` and BEGIN ms `^` when using other available ms.

* FIXED: Fixed ##?? ++?? for " = 12" -> "= 123".

* FIXED: Fixed an early return when matching.

* FIXED: Fixed Compiler Error such C2758 etc for C99/MSVC10 compilers (VS2010).

* FIXED: Fixed NuGet package use for native C/C++ projects.

* CHANGED: Implemented MS combinations for END $ such as *$, ??$, +$.

* CHANGED: Implemented MS combinations for BEGIN ^ such as ^+, ^#, ^?.

* CHANGED: Added aliases EssRxW/ExtRxW/RxW to the main algorithms.

* CHANGED: Added RXW_UNICODE for user targets when CharacterSet is Unicode.

* CHANGED: `AlgorithmEss::search()` was marked as obsolete and can be removed in future major versions.

* CHANGED: regXwildAPI.h was marked as obsolete. Please use regXwild.common.h or regXwild.h.

* CHANGED: Most our types are spaced now as regXwild::rxwtypes.

* NOTE: You can find various flexible use for .NET in our new dotnet-test project through Conari engine:
        https://github.com/3F/Conari
        https://github.com/3F/regXwild
  • Loading branch information
3F committed Mar 7, 2021
1 parent 375a6d0 commit ac1f478
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.0
1.4.0
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ Play with our actual **Unit-Tests**.
1.4+

```cpp
EssRxW::Match m;
EssRxW::MatchResult m;
rxw.match
(
_T("number = '8888'; //TODO: up"),
_T("'+'"),
EssRxW::FlagsRxW::F_MATCH_RESULT,
EssRxW::EngineOptions::F_MATCH_RESULT,
&m
);
//m.start = 9
Expand Down
84 changes: 84 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,90 @@
regXwild - https://github.com/3F/regXwild
- - - - - - - - - - - - - - - - - - - - -

[v1.4] 2021.03.07

* NEW: Modern `match()` method for ESS implementation with bitwise options:
```
bool match(const tstring& input, const tstring& pattern, const EngineOptions& options, MatchResult* result);
```
Searches an input string for a substring that matches a pattern.
Use F_ICASE = 0x001 to ignore case sensitivity when matching.

* NEW: Implemented `>c` metasymbol.
Modern `>` as [^c]*str | [^c]*$

This is default behavior using match().
To activate legacy `>` as [^/]*str | [^/]*$ use F_LEGACY_ANYSP = 0x080

* NEW: Implemented F_MATCH_RESULT = 0x002 flag to collect additional data for the MatchResult.
```
EssRxW::MatchResult m;
rxw.match
(
_T("number = '8888'; //TODO: up"),
_T("'+'"),
EssRxW::EngineOptions::F_MATCH_RESULT,
&m
);
//m.start = 9
//m.end = 15
```

* NEW: Added `replace()` method for ESS implementation.
```
bool replace(tstring& input, const tstring& pattern, const tstring& replacement, const EngineOptions& options);
```
In a specified input, replaces first substring that match a specified pattern with a specified replacement string.

* NEW: Implemented optional offset for `match()` and `replace()` methods. ESS impl.
```
bool replace(tstring& input, const tstring& pattern, const tstring& replacement, udiff_t offset, const EngineOptions& options)
bool match(const tstring& input, const tstring& pattern, udiff_t offset, const EngineOptions& options, MatchResult* result)
```
udiff_t offset - The starting position to start matching.

* NEW: Implemented F_MATCH_ALL = 0x004. Do not finish on first match in replace() method.

* NEW: New C-export functions in common.h PE/Invoke or other outside environments.
```
bool replace(TCHAR* input, const TCHAR* pattern, const TCHAR* replacement, flagcfg_t options);
bool replaceOfs(TCHAR* input, const TCHAR* pattern, const TCHAR* replacement, udiff_t offset, flagcfg_t options);
bool match(const TCHAR* input, const TCHAR* pattern, flagcfg_t options, EssRxW::MatchResult* result);
bool matchOfs(const TCHAR* input, const TCHAR* pattern, udiff_t offset, flagcfg_t options, EssRxW::MatchResult* result);
bool replaceTo(const TCHAR* input, const TCHAR* pattern, const TCHAR* replacement, TCHAR* to, udiff_t offset, flagcfg_t options);
```

* FIXED: Fixed SINGLE ms for +++ and `system+` or like.

* FIXED: Fixed END ms `$` and BEGIN ms `^` when using other available ms.

* FIXED: Fixed ##?? ++?? for " = 12" -> "= 123".

* FIXED: Fixed an early return when matching.

* FIXED: Fixed Compiler Error such C2758 etc for C99/MSVC10 compilers (VS2010).

* FIXED: Fixed NuGet package use for native C/C++ projects.

* CHANGED: Implemented MS combinations for END $ such as *$, ??$, +$.

* CHANGED: Implemented MS combinations for BEGIN ^ such as ^+, ^#, ^?.

* CHANGED: Added aliases EssRxW/ExtRxW/RxW to the main algorithms.

* CHANGED: Added RXW_UNICODE for user targets when CharacterSet is Unicode.

* CHANGED: `AlgorithmEss::search()` was marked as obsolete and can be removed in future major versions.

* CHANGED: regXwildAPI.h was marked as obsolete. Please use regXwild.common.h or regXwild.h.

* CHANGED: Most our types are spaced now as regXwild::rxwtypes.

* NOTE: You can find various flexible use for .NET in our new dotnet-test project through Conari engine:
https://github.com/3F/Conari
https://github.com/3F/regXwild


[v1.3] 2020.08.10

* NEW: Quantifiers are now standardized as follows:
Expand Down
4 changes: 2 additions & 2 deletions regXwild/RXWVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ namespace net { namespace r_eg { namespace regXwild
const int patch;
const int build;

TNum() : major(1), minor(3), patch(0), build(0) { }
TNum() : major(1), minor(4), patch(0), build(0) { }

} number;

const rxwtypes::TCHAR* bSha1;
const rxwtypes::TCHAR* config;
const rxwtypes::TCHAR* product;

RXWVersion() : bSha1(_T("")), config(_T("")), product(_T("1.3.0")) { }
RXWVersion() : bSha1(_T("")), config(_T("")), product(_T("1.4.0")) { }
};
}}}

Expand Down
2 changes: 1 addition & 1 deletion regXwild/regXwild.common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ namespace net { namespace r_eg { namespace regXwild { namespace common
*/
REGXWILD_API_L const rxwtypes::TCHAR* versionString()
{
return /*vsSBE*/_T("1.3.0");
return /*vsSBE*/_T("1.4.0");
}

}}}}
8 changes: 4 additions & 4 deletions regXwild/regXwild.rc
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,3,0,0
PRODUCTVERSION 1,3,0,0
FILEVERSION 1,4,0,0
PRODUCTVERSION 1,4,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -79,12 +79,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "github.com/3F"
VALUE "FileDescription", "https://github.com/3F/regXwild"
VALUE "FileVersion", "1.3.0.0"
VALUE "FileVersion", "1.4.0.0"
VALUE "InternalName", "regXwild.dll"
VALUE "LegalCopyright", "Copyright (c) 2013-2021 Denis Kuzmin <[email protected]> github/3F"
VALUE "OriginalFilename", "regXwild.dll"
VALUE "ProductName", "regXwild"
VALUE "ProductVersion", "1.3.0"
VALUE "ProductVersion", "1.4.0"
END
END
BLOCK "VarFileInfo"
Expand Down

0 comments on commit ac1f478

Please sign in to comment.