Pregex

Latest version: v2.3.3

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

Scan your dependencies

Page 2 of 2

1.3.0

- Updated README file and docs.
- Renamed "AtLeastOnce" to "OneOrMore".
- Renamed "CapturingGroup" to "Capture".
- Renamed "NonCapturingGroup" to "Group".
- Renamed "Pregex.get_groups" to "Pregex.get_captured_groups".
- Fixed bug where some punctuation characters were through as part of ranges due to their ASCII code.
- Removed raw-string-conversion from tokens (except for backslash).
- Added being able to perform a union/subtraction between a regular class and a token.
- Providing a quantifier other than "Exactly" as parameter "pre2" to either "PrecededBy" or "NotPrecededBy" now causes a "NonFixedWidthException" exception to be thrown.
- Moved exceptions from "Pregex" protected methods, to corresponding classes.
- Modified existing tests for all the above and added some new ones.

1.2.0

- Updated docs and README file.
- Removed "group_on" parameters from "Pregex".
- Added a nested "_PatternType" enum within "Pregex".
- Added "type" parameter of type "_PatternType" to "Pregex" which dictates the instance's groupping rules.
- Every protected method of "Pregex" that returned a "Pregex" instance, now returns a string instead.
- Removed "Literal" class and moved its functionality to "Pregex", by adding a "escape" parameter to its constructor.
- Removed "Token" base class.
- Moved "simplify class patterns" functionality into classes and out of Pregex.get_pattern(), so re.sub isn't invoked every time "get_pattern" is invoked.
- Removed "pregex.exceptions.MultiCharTokenException"
- Renamed "NotQuantifiableException" to "CannotBeQuantifiedException".
- Added "__Assertion" base class for "__Anchor" and "__Lookaround".
- "__Assertion" child classes can no longer be quantified.
- "__Quantifier" child classes can no longer be quantified.
- Class "pregex.pre.Pregex" is now imported as well when using "from pregex import *".
- Added corresponding tests or modified existing tests.

1.1.0

- Improved README file and documentation page.
- Classes that contain a single character are now simplified when printing their pattern.
- Individual chars in classes are now removed when there already exists a range that includes them.
- Added Subtraction operation for classes.
- Added "pregex.groups.Conditional" for constructing conditional patterns.
- Fixed various bugs that occured when printing pattern containing some punctuation characters.
- Added corresponding tests for all the above.

1.0.0

First release.

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.