STRling 2.3.1__tar.gz → 2.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {strling-2.3.1 → strling-2.4.1}/PKG-INFO +9 -4
- {strling-2.3.1 → strling-2.4.1}/README.md +7 -2
- {strling-2.3.1 → strling-2.4.1}/STRling/simply/static.py +15 -52
- {strling-2.3.1 → strling-2.4.1}/STRling.egg-info/PKG-INFO +9 -4
- {strling-2.3.1 → strling-2.4.1}/setup.py +1 -1
- {strling-2.3.1 → strling-2.4.1}/STRling/__init__.py +0 -0
- {strling-2.3.1 → strling-2.4.1}/STRling/simply/__init__.py +0 -0
- {strling-2.3.1 → strling-2.4.1}/STRling/simply/constructors.py +0 -0
- {strling-2.3.1 → strling-2.4.1}/STRling/simply/lookarounds.py +0 -0
- {strling-2.3.1 → strling-2.4.1}/STRling/simply/pattern.py +0 -0
- {strling-2.3.1 → strling-2.4.1}/STRling/simply/sets.py +0 -0
- {strling-2.3.1 → strling-2.4.1}/STRling.egg-info/SOURCES.txt +0 -0
- {strling-2.3.1 → strling-2.4.1}/STRling.egg-info/dependency_links.txt +0 -0
- {strling-2.3.1 → strling-2.4.1}/STRling.egg-info/top_level.txt +0 -0
- {strling-2.3.1 → strling-2.4.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: STRling
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.4.1
|
|
4
4
|
Description-Content-Type: text/markdown
|
|
5
5
|
|
|
6
6
|
# STRling
|
|
@@ -32,7 +32,7 @@ pip install STRling
|
|
|
32
32
|
|
|
33
33
|
## ✨ STRling in action!
|
|
34
34
|
|
|
35
|
-
### 📑 [STRling Documentation on GitHub](https://github.com/TheCyberLocal/STRling/blob/main/docs/strling_docs.md)
|
|
35
|
+
### 📑 [STRling Documentation on GitHub](https://github.com/TheCyberLocal/STRling-Py/blob/main/docs/strling_docs.md)
|
|
36
36
|
|
|
37
37
|
```python
|
|
38
38
|
from STRling import simply as s
|
|
@@ -99,8 +99,13 @@ for match in matches:
|
|
|
99
99
|
Simplify your string validation and matching tasks with STRling, the all-in-one solution for developers who need a powerful yet user-friendly tool for working with strings. No longer write RegEx using complex jargon or the various syntaxes string validation specific to independent libraries. Download and start using STRling today!
|
|
100
100
|
|
|
101
101
|
## 🌎 Locations
|
|
102
|
-
|
|
103
|
-
[](https://pypi.org/project/STRling/)
|
|
104
|
+
[](https://github.com/TheCyberLocal/STRling-Py)
|
|
105
|
+
|
|
106
|
+
### STRling for JavaScript
|
|
107
|
+
[](.)
|
|
108
|
+
[](https://github.com/TheCyberLocal/STRling-JS)
|
|
104
109
|
|
|
105
110
|
## 🌐 Socials
|
|
106
111
|
[](https://linkedin.com/in/tzm01)
|
|
@@ -94,8 +94,13 @@ for match in matches:
|
|
|
94
94
|
Simplify your string validation and matching tasks with STRling, the all-in-one solution for developers who need a powerful yet user-friendly tool for working with strings. No longer write RegEx using complex jargon or the various syntaxes string validation specific to independent libraries. Download and start using STRling today!
|
|
95
95
|
|
|
96
96
|
## 🌎 Locations
|
|
97
|
-
|
|
98
|
-
[](https://pypi.org/project/STRling/)
|
|
99
|
+
[](https://github.com/TheCyberLocal/STRling-Py)
|
|
100
|
+
|
|
101
|
+
### STRling for JavaScript
|
|
102
|
+
[](.)
|
|
103
|
+
[](https://github.com/TheCyberLocal/STRling-JS)
|
|
99
104
|
|
|
100
105
|
## 🌐 Socials
|
|
101
106
|
[](https://linkedin.com/in/tzm01)
|
|
@@ -7,9 +7,10 @@ from .pattern import Pattern, lit
|
|
|
7
7
|
# Custom Char Sets
|
|
8
8
|
########
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
def alpha_num(min_rep: int = None, max_rep: int = None):
|
|
11
12
|
"""
|
|
12
|
-
Matches any
|
|
13
|
+
Matches any letter (uppercase or lowercase) or digit.
|
|
13
14
|
|
|
14
15
|
Parameters: (min_rep/exact_rep, max_rep)
|
|
15
16
|
- min_rep (optional): Specifies the minimum number of characters to match.
|
|
@@ -22,13 +23,12 @@ def special_char(min_rep: int = None, max_rep: int = None):
|
|
|
22
23
|
Returns:
|
|
23
24
|
- An instance of the Pattern class.
|
|
24
25
|
"""
|
|
25
|
-
|
|
26
|
-
return Pattern(f'[{str(special)}]', custom_set=True)(min_rep, max_rep)
|
|
26
|
+
return Pattern(r'[A-Za-z0-9]', custom_set=True)(min_rep, max_rep)
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
def
|
|
29
|
+
def not_alpha_num(min_rep: int = None, max_rep: int = None):
|
|
30
30
|
"""
|
|
31
|
-
Matches
|
|
31
|
+
Matches any character that is not a letter or digit.
|
|
32
32
|
|
|
33
33
|
Parameters: (min_rep/exact_rep, max_rep)
|
|
34
34
|
- min_rep (optional): Specifies the minimum number of characters to match.
|
|
@@ -41,14 +41,12 @@ def not_special_char(min_rep: int = None, max_rep: int = None):
|
|
|
41
41
|
Returns:
|
|
42
42
|
- An instance of the Pattern class.
|
|
43
43
|
"""
|
|
44
|
-
|
|
45
|
-
return Pattern(f'[^{str(special)}]', custom_set=True, negated=True)(min_rep, max_rep)
|
|
44
|
+
return Pattern(r'[^A-Za-z0-9]', custom_set=True, negated=True)(min_rep, max_rep)
|
|
46
45
|
|
|
47
46
|
|
|
48
|
-
def
|
|
47
|
+
def special_char(min_rep: int = None, max_rep: int = None):
|
|
49
48
|
"""
|
|
50
|
-
Matches any
|
|
51
|
-
A word character is any case letter, a digit, or an underscore.
|
|
49
|
+
Matches any special character. => !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
|
|
52
50
|
|
|
53
51
|
Parameters: (min_rep/exact_rep, max_rep)
|
|
54
52
|
- min_rep (optional): Specifies the minimum number of characters to match.
|
|
@@ -61,13 +59,13 @@ def word_char(min_rep: int = None, max_rep: int = None):
|
|
|
61
59
|
Returns:
|
|
62
60
|
- An instance of the Pattern class.
|
|
63
61
|
"""
|
|
64
|
-
|
|
62
|
+
special = lit("""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~""")
|
|
63
|
+
return Pattern(f'[{str(special)}]', custom_set=True)(min_rep, max_rep)
|
|
65
64
|
|
|
66
65
|
|
|
67
|
-
def
|
|
66
|
+
def not_special_char(min_rep: int = None, max_rep: int = None):
|
|
68
67
|
"""
|
|
69
|
-
Matches anything but a
|
|
70
|
-
A word character is any case letter, a digit, or an underscore.
|
|
68
|
+
Matches anything but a special character. => !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
|
|
71
69
|
|
|
72
70
|
Parameters: (min_rep/exact_rep, max_rep)
|
|
73
71
|
- min_rep (optional): Specifies the minimum number of characters to match.
|
|
@@ -80,7 +78,8 @@ def not_word_char(min_rep: int = None, max_rep: int = None):
|
|
|
80
78
|
Returns:
|
|
81
79
|
- An instance of the Pattern class.
|
|
82
80
|
"""
|
|
83
|
-
|
|
81
|
+
special = lit("""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~""")
|
|
82
|
+
return Pattern(f'[^{str(special)}]', custom_set=True, negated=True)(min_rep, max_rep)
|
|
84
83
|
|
|
85
84
|
|
|
86
85
|
def letter(min_rep: int = None, max_rep: int = None):
|
|
@@ -361,24 +360,6 @@ def tab(min_rep: int = None, max_rep: int = None):
|
|
|
361
360
|
return Pattern(r'\t')(min_rep, max_rep)
|
|
362
361
|
|
|
363
362
|
|
|
364
|
-
def not_tab(min_rep: int = None, max_rep: int = None):
|
|
365
|
-
"""
|
|
366
|
-
Matches any character that is not a tab.
|
|
367
|
-
|
|
368
|
-
Parameters: (min_rep/exact_rep, max_rep)
|
|
369
|
-
- min_rep (optional): Specifies the minimum number of characters to match.
|
|
370
|
-
- max_rep (optional): Specifies the maximum number of characters to match.
|
|
371
|
-
|
|
372
|
-
Special Cases:
|
|
373
|
-
- If only `min_rep` is specified, it represents the exact number of characters to match.
|
|
374
|
-
- If `max_rep` is 0, it means there is no upper limit.
|
|
375
|
-
|
|
376
|
-
Returns:
|
|
377
|
-
- An instance of the Pattern class.
|
|
378
|
-
"""
|
|
379
|
-
return Pattern(r'\T')(min_rep, max_rep)
|
|
380
|
-
|
|
381
|
-
|
|
382
363
|
def carriage(min_rep: int = None, max_rep: int = None):
|
|
383
364
|
"""
|
|
384
365
|
Matches a carriage return character.
|
|
@@ -397,24 +378,6 @@ def carriage(min_rep: int = None, max_rep: int = None):
|
|
|
397
378
|
return Pattern(r'\r')(min_rep, max_rep)
|
|
398
379
|
|
|
399
380
|
|
|
400
|
-
def not_carriage(min_rep: int = None, max_rep: int = None):
|
|
401
|
-
"""
|
|
402
|
-
Matches any character that is not a carriage return.
|
|
403
|
-
|
|
404
|
-
Parameters: (min_rep/exact_rep, max_rep)
|
|
405
|
-
- min_rep (optional): Specifies the minimum number of characters to match.
|
|
406
|
-
- max_rep (optional): Specifies the maximum number of characters to match.
|
|
407
|
-
|
|
408
|
-
Special Cases:
|
|
409
|
-
- If only `min_rep` is specified, it represents the exact number of characters to match.
|
|
410
|
-
- If `max_rep` is 0, it means there is no upper limit.
|
|
411
|
-
|
|
412
|
-
Returns:
|
|
413
|
-
- An instance of the Pattern class.
|
|
414
|
-
"""
|
|
415
|
-
return Pattern(r'\R')(min_rep, max_rep)
|
|
416
|
-
|
|
417
|
-
|
|
418
381
|
def bound(min_rep: int = None, max_rep: int = None):
|
|
419
382
|
"""
|
|
420
383
|
Matches a boundary character.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: STRling
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.4.1
|
|
4
4
|
Description-Content-Type: text/markdown
|
|
5
5
|
|
|
6
6
|
# STRling
|
|
@@ -32,7 +32,7 @@ pip install STRling
|
|
|
32
32
|
|
|
33
33
|
## ✨ STRling in action!
|
|
34
34
|
|
|
35
|
-
### 📑 [STRling Documentation on GitHub](https://github.com/TheCyberLocal/STRling/blob/main/docs/strling_docs.md)
|
|
35
|
+
### 📑 [STRling Documentation on GitHub](https://github.com/TheCyberLocal/STRling-Py/blob/main/docs/strling_docs.md)
|
|
36
36
|
|
|
37
37
|
```python
|
|
38
38
|
from STRling import simply as s
|
|
@@ -99,8 +99,13 @@ for match in matches:
|
|
|
99
99
|
Simplify your string validation and matching tasks with STRling, the all-in-one solution for developers who need a powerful yet user-friendly tool for working with strings. No longer write RegEx using complex jargon or the various syntaxes string validation specific to independent libraries. Download and start using STRling today!
|
|
100
100
|
|
|
101
101
|
## 🌎 Locations
|
|
102
|
-
|
|
103
|
-
[](https://pypi.org/project/STRling/)
|
|
104
|
+
[](https://github.com/TheCyberLocal/STRling-Py)
|
|
105
|
+
|
|
106
|
+
### STRling for JavaScript
|
|
107
|
+
[](.)
|
|
108
|
+
[](https://github.com/TheCyberLocal/STRling-JS)
|
|
104
109
|
|
|
105
110
|
## 🌐 Socials
|
|
106
111
|
[](https://linkedin.com/in/tzm01)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|