STRling 2.4.2__tar.gz → 2.4.3__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.4.2
3
+ Version: 2.4.3
4
4
  Description-Content-Type: text/markdown
5
5
 
6
6
  # STRling
@@ -190,15 +190,10 @@ def not_lower(min_rep: int = None, max_rep: int = None):
190
190
  return Pattern(r'[^a-z]', custom_set=True, negated=True)(min_rep, max_rep)
191
191
 
192
192
 
193
-
194
- ############################
195
- # Predefined Char Sets
196
- ########
197
-
198
-
199
- def digit(min_rep: int = None, max_rep: int = None):
193
+ def hex_digit(min_rep: int = None, max_rep: int = None):
200
194
  """
201
- Matches any digit.
195
+ Matches any hex-digit character.
196
+ A hex-digit character is any letter A through F (uppercase or lowercase) or any digit (0-9).
202
197
 
203
198
  Parameters: (min_rep/exact_rep, max_rep)
204
199
  - min_rep (optional): Specifies the minimum number of characters to match.
@@ -211,12 +206,13 @@ def digit(min_rep: int = None, max_rep: int = None):
211
206
  Returns:
212
207
  - An instance of the Pattern class.
213
208
  """
214
- return Pattern(r'\d')(min_rep, max_rep)
209
+ return Pattern(r'[A-Fa-f\d]', custom_set=True)(min_rep, max_rep)
215
210
 
216
211
 
217
- def not_digit(min_rep: int = None, max_rep: int = None):
212
+ def not_hex_digit(min_rep: int = None, max_rep: int = None):
218
213
  """
219
- Matches any character that is not a digit.
214
+ Matches anything but a hex-digit character.
215
+ A hex-digit character is any letter A through F (uppercase or lowercase) or any digit (0-9).
220
216
 
221
217
  Parameters: (min_rep/exact_rep, max_rep)
222
218
  - min_rep (optional): Specifies the minimum number of characters to match.
@@ -229,13 +225,18 @@ def not_digit(min_rep: int = None, max_rep: int = None):
229
225
  Returns:
230
226
  - An instance of the Pattern class.
231
227
  """
232
- return Pattern(r'\D')(min_rep, max_rep)
228
+ return Pattern(r'[^A-Fa-f\d]', custom_set=True, negated=True)(min_rep, max_rep)
233
229
 
234
230
 
235
- def hex_digit(min_rep: int = None, max_rep: int = None):
231
+
232
+ ############################
233
+ # Predefined Char Sets
234
+ ########
235
+
236
+
237
+ def digit(min_rep: int = None, max_rep: int = None):
236
238
  """
237
- Matches any hex-digit character.
238
- A hex-digit character is any letter A through F (uppercase or lowercase) or any digit (0-9).
239
+ Matches any digit.
239
240
 
240
241
  Parameters: (min_rep/exact_rep, max_rep)
241
242
  - min_rep (optional): Specifies the minimum number of characters to match.
@@ -248,13 +249,12 @@ def hex_digit(min_rep: int = None, max_rep: int = None):
248
249
  Returns:
249
250
  - An instance of the Pattern class.
250
251
  """
251
- return Pattern(r'[A-Fa-f\d]')(min_rep, max_rep)
252
+ return Pattern(r'\d')(min_rep, max_rep)
252
253
 
253
254
 
254
- def not_hex_digit(min_rep: int = None, max_rep: int = None):
255
+ def not_digit(min_rep: int = None, max_rep: int = None):
255
256
  """
256
- Matches anything but a hex-digit character.
257
- A hex-digit character is any letter A through F (uppercase or lowercase) or any digit (0-9).
257
+ Matches any character that is not a digit.
258
258
 
259
259
  Parameters: (min_rep/exact_rep, max_rep)
260
260
  - min_rep (optional): Specifies the minimum number of characters to match.
@@ -267,7 +267,7 @@ def not_hex_digit(min_rep: int = None, max_rep: int = None):
267
267
  Returns:
268
268
  - An instance of the Pattern class.
269
269
  """
270
- return Pattern(r'[^A-Fa-f\d]')(min_rep, max_rep)
270
+ return Pattern(r'\D')(min_rep, max_rep)
271
271
 
272
272
 
273
273
  def whitespace(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.4.2
3
+ Version: 2.4.3
4
4
  Description-Content-Type: text/markdown
5
5
 
6
6
  # STRling
@@ -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.4.2',
12
+ version='2.4.3',
13
13
  packages=find_packages(),
14
14
  install_requires=[
15
15
  # Add dependencies here.
File without changes
File without changes
File without changes
File without changes