Grex

Latest version: v1.0.1

Safety actively analyzes 687959 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

1.3.0

Features
- anchors can now be disabled so that the generated expression can be used as part of a larger one (30)
- the command-line tool can now be used within Unix pipelines (45)

Changes
- Additional methods have been added to `RegExpBuilder` in order to replace the enum `Feature` and make the library API more consistent. (47)

Bug Fixes
- Under rare circumstances, the conversion of repetitions did not work. This has been fixed. (36)

1.2.0

Features
- verbose mode is now supported with the `--verbose` flag to produce regular expressions which are easier to read (17)

1.1.0

Features
- case-insensitive matching regexes are now supported with the `--ignore-case` command-line flag or with `Feature::CaseInsensitivity` in the library (23)
- non-capturing groups are now the default; capturing groups can be enabled with the `--capture-groups` command-line flag or with `Feature::CapturingGroup` in the library (15)
- a lower bound for the conversion of repeated substrings can now be set by specifying `--min-repetitions` and `--min-substring-length` or using the library methods `RegExpBuilder.with_minimum_repetitions()` and `RegExpBuilder.with_minimum_substring_length()` (10)
- test cases can now be passed from a file within the library as well using `RegExpBuilder::from_file()` (13)

Changes

- the rules for the conversion of test cases to shorthand character classes have been updated to be compliant to the newest Unicode Standard 13.0 (21)
- the dependency on the unmaintained linked-list crate has been removed (24)

Bug Fixes

- test cases starting with a hyphen are now correctly parsed on the command-line (12)
- the common substring detection algorithm now uses optionality expressions where possible instead of redundant union operations (22)

Test Coverage
- new unit tests, integration tests and property tests have been added

1.0.0

Finally, the first stable release 1.0.0 is there. :-)

Features
- conversion to character classes `\d`, `\D`, `\s`, `\S`, `\w`, `\W` is now supported
- repetition detection now works with arbitrarily nested expressions. Input strings such as `aaabaaab` which were previously converted to `^(aaab){2}$` are now converted to `^(a{3}b){2}$`.
- optional syntax highlighting for the produced regular expressions can now be enabled using the `--colorize` command-line flag or with the library method `RegExpBuilder.with_syntax_highlighting()`

Test Coverage
- new unit tests, integration tests and property tests have been added

0.3.2

Test Coverage
- new property tests have been added that revealed new bugs

Bug Fixes
- entire rewrite of the repetition detection algorithm
- the former algorithm produced wrong regular expressions or even panicked for certain test cases (9)

0.3.1

Test Coverage
- property tests have been added using the [proptest](https://crates.io/crates/proptest) crate
- big thanks go to [Christophe Biocca](https://github.com/christophebiocca) for pointing me to the concept of property tests in the first place and for writing an initial implementation of these tests

Bug Fixes
- some regular expression specific characters were not escaped correctly in the generated expression
- expressions consisting of a single alternation such as `^(abc|xyz)$` were missing the outer parentheses. This caused an erroneous match of strings such as `abc123` or `456xyz` because of precedence rules.
- the created DFA was wrong for repetition conversion in some corner cases. The input `a, aa, aaa, aaaa, aaab` previously returned the expression `^a{1,4}b?$` which erroneously matches `aaaab`. Now the correct expression `^(a{3}b|a{1,4})$` is returned.

Documentation
- some minor documentation updates

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.