-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v2.2.0 - Introducing the concept of "Extensibility": All patterns that correspond to classes within "pregex.meta" have numerous assertions imposed upon them, that are essential in order for them to be able to match what they are supposed to. These assertions are mostly word boundaries that are placed at the start and at the end of the pattern, but there might be other types of assertions as well. Helpful as they are for matching, these assertions might complicate things when it comes to the pattern being used as a building block to a larger pattern. For that reason, there has been added a "is_extensible" parameter to the constructor of every meta class. As a general rule of thumb, you should only set "is_extensible" to "True" if you wish to use a pattern as part of a larger one. For matching purposes, have "is_extensible" take its default value of "False". - Class "pregex.core.pre.Pregex" now contains a set of "{get, iterate}_named_captures" methods through which one has access to any named captured groups stored within dictionaries. - Parameter "pattern" of class "pregex.core.pre.Pregex" constructor now defaults to the empty string, thus replacing "pregex.core.pre.Empty" which has now been removed. - All classes within "pregex.core.operators" can now receive one or even no arguments without throwing a "NotEnoughArgumentsException" exception. This makes it easier to do stuff like "pre = op.Either(*patterns)" without having to check whether list "patterns" contains more than one pattern. - Applying the alternation operator between a pattern "P" and the empty string pattern now results in pattern "P" itself. - Wrapping the empty pattern in either a capturing or a non-capturing group now results into the empty pattern itself. - Classes "pregex.core.assertions.{__PositiveLookaround, __NegativeLookaround}" have been removed and replaced by a single class "pregex.core.assertions.__Lookaround". - Classes "pregex.core.assertions.{FollowedBy, PrecededBy, EnclosedBy}" are now able to receive more than one assertion patterns, just like their negative counterparts. - Class "pregex.meta.essentials.Date" now receives date formats in a list instead of as arbitrary arguments. - Corrected mistake where method "pregex.core.pre.Pregex.not_enclosed_by" could receive multiple arguments. - Updated documentaton and README. - Modified some existing tests and added some more.
- Loading branch information
Showing
24 changed files
with
2,148 additions
and
957 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
pregex==2.1.1 | ||
pregex==2.2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.