Rgx

Latest version: v2.0.0

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

Scan your dependencies

Page 2 of 3

1.3.4

1.3.3

Changes:
- `Range.repeat()` now has an optimizing strategy. This doesn't change a lot, basically just a rewrite of old logic.
For details on how it works check the [docstring of the method](https://github.com/evtn/rgx/blob/872e5ec9631d85e4d75a70c01cf1e7202606fe3c/rgx/entities.py#L798)
- `RegexPattern.repeat(1)` now renders without a redundant group

Fixes:
- `RegexPattern.repeat(0)` now renders as an empty pattern (the type is the same, renders differently), instead of invalid `pattern{}`

Misc:
- Applied `black` formatter to code

1.3.2

1.3.1

1.3.0

- Dropped all `Quantifier` classes in favor of `Range`
- Added quantifier merging: `x.many().many() == x+`, `x.maybe().many() == x.some() == x*`
- Added `RegexPattern.repeat()` and `RegexPattern.__mul__` as aliases of `RegexPattern.x_times()`
- Added `Range.or_more()`, `Range.or_less()` and `Range.to(count)` (check "Repeating patterns" in docs)
- Added `Chars.to(other)` and `Literal.to(other)`: e.g. `pattern("a").to("z")` is the same as `char_range()`
- `pattern(one_char_string)` now produces `Chars`
- Chars now render differently depending on content:
- Contents are now sorted and optimised by merging overlapping parts, e.g. `[01-9a5]` would be rendered as `[0-9a]`
- If Chars instence consists of one part and it is one symbol, it renders just that symbol: `[x]` -> `x`
- Ranges of length 2 and 3 are rendered just as characters: `[0-1]` -> `[01]` and `[0-2]` -> `[012]`

1.2.0

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.