STRling 2.3.1__tar.gz → 2.4.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: STRling
3
- Version: 2.3.1
3
+ Version: 2.4.0
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
@@ -100,7 +100,7 @@ Simplify your string validation and matching tasks with STRling, the all-in-one
100
100
 
101
101
  ## 🌎 Locations
102
102
  [![STRling on PyPI](https://img.shields.io/pypi/v/STRling?color=blue&logo=pypi)](https://pypi.org/project/STRling/)
103
- [![STRling on GitHub](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal/STRling)
103
+ [![STRling on GitHub](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal/STRling-Py)
104
104
 
105
105
  ## 🌐 Socials
106
106
  [![LinkedIn](https://img.shields.io/badge/LinkedIn-%230077B5.svg?logo=linkedin&logoColor=white)](https://linkedin.com/in/tzm01)
@@ -95,7 +95,7 @@ Simplify your string validation and matching tasks with STRling, the all-in-one
95
95
 
96
96
  ## 🌎 Locations
97
97
  [![STRling on PyPI](https://img.shields.io/pypi/v/STRling?color=blue&logo=pypi)](https://pypi.org/project/STRling/)
98
- [![STRling on GitHub](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal/STRling)
98
+ [![STRling on GitHub](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal/STRling-Py)
99
99
 
100
100
  ## 🌐 Socials
101
101
  [![LinkedIn](https://img.shields.io/badge/LinkedIn-%230077B5.svg?logo=linkedin&logoColor=white)](https://linkedin.com/in/tzm01)
@@ -7,9 +7,10 @@ from .pattern import Pattern, lit
7
7
  # Custom Char Sets
8
8
  ########
9
9
 
10
- def special_char(min_rep: int = None, max_rep: int = None):
10
+
11
+ def alpha_num(min_rep: int = None, max_rep: int = None):
11
12
  """
12
- Matches any special character. => !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
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
- special = lit("""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~""")
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 not_special_char(min_rep: int = None, max_rep: int = None):
29
+ def not_alpha_num(min_rep: int = None, max_rep: int = None):
30
30
  """
31
- Matches anything but a special character. => !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
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
- special = lit("""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~""")
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 word_char(min_rep: int = None, max_rep: int = None):
47
+ def special_char(min_rep: int = None, max_rep: int = None):
49
48
  """
50
- Matches any word character.
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
- return Pattern(r'[a-zA-Z0-9_]', custom_set=True)(min_rep, max_rep)
62
+ special = lit("""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~""")
63
+ return Pattern(f'[{str(special)}]', custom_set=True)(min_rep, max_rep)
65
64
 
66
65
 
67
- def not_word_char(min_rep: int = None, max_rep: int = None):
66
+ def not_special_char(min_rep: int = None, max_rep: int = None):
68
67
  """
69
- Matches anything but a word character.
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
- return Pattern(r'[^a-zA-Z0-9_]', custom_set=True, negated=True)(min_rep, max_rep)
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):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: STRling
3
- Version: 2.3.1
3
+ Version: 2.4.0
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
@@ -100,7 +100,7 @@ Simplify your string validation and matching tasks with STRling, the all-in-one
100
100
 
101
101
  ## 🌎 Locations
102
102
  [![STRling on PyPI](https://img.shields.io/pypi/v/STRling?color=blue&logo=pypi)](https://pypi.org/project/STRling/)
103
- [![STRling on GitHub](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal/STRling)
103
+ [![STRling on GitHub](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/TheCyberLocal/STRling-Py)
104
104
 
105
105
  ## 🌐 Socials
106
106
  [![LinkedIn](https://img.shields.io/badge/LinkedIn-%230077B5.svg?logo=linkedin&logoColor=white)](https://linkedin.com/in/tzm01)
@@ -9,7 +9,7 @@ with open('./docs/pypi_docs.md', 'r') as f:
9
9
 
10
10
  setup(
11
11
  name='STRling',
12
- version='2.3.1',
12
+ version='2.4.0',
13
13
  packages=find_packages(),
14
14
  install_requires=[
15
15
  # Add dependencies here.
File without changes
File without changes
File without changes