reru 0.1.1__cp314-cp314-win_amd64.whl → 0.1.2__cp314-cp314-win_amd64.whl
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.
- reru/__init__.pyi +8 -0
- reru/reru.cp314-win_amd64.pyd +0 -0
- {reru-0.1.1.dist-info → reru-0.1.2.dist-info}/METADATA +11 -1
- reru-0.1.2.dist-info/RECORD +8 -0
- reru-0.1.1.dist-info/RECORD +0 -8
- {reru-0.1.1.dist-info → reru-0.1.2.dist-info}/WHEEL +0 -0
- {reru-0.1.1.dist-info → reru-0.1.2.dist-info}/licenses/LICENSE +0 -0
reru/__init__.pyi
CHANGED
|
@@ -5,6 +5,12 @@ class Match:
|
|
|
5
5
|
def end(self) -> int: ...
|
|
6
6
|
def group(self, _i: int = 0) -> str: ...
|
|
7
7
|
|
|
8
|
+
class Pattern:
|
|
9
|
+
def is_match(self, text: str) -> bool: ...
|
|
10
|
+
def match(self, text: str) -> Optional[Match]: ...
|
|
11
|
+
def search(self, text: str) -> Optional[Match]: ...
|
|
12
|
+
|
|
13
|
+
|
|
8
14
|
class ReConfig:
|
|
9
15
|
case_insensitive: bool
|
|
10
16
|
ignore_whitespace: bool
|
|
@@ -21,5 +27,7 @@ class ReConfig:
|
|
|
21
27
|
|
|
22
28
|
|
|
23
29
|
class ReRu:
|
|
30
|
+
def compile(pattern: str, config: Optional[ReConfig] = None) -> Pattern: ...
|
|
24
31
|
def is_match(pattern: str, text: str, config: Optional[ReConfig] = None) -> bool: ...
|
|
32
|
+
def match(pattern: str, text: str, config: Optional[ReConfig] = None) -> Optional[Match]: ...
|
|
25
33
|
def search(pattern: str, text: str, config: Optional[ReConfig] = None) -> Optional[Match]: ...
|
reru/reru.cp314-win_amd64.pyd
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: reru
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Classifier: Development Status :: 3 - Alpha
|
|
5
5
|
Classifier: Programming Language :: Rust
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
@@ -72,6 +72,11 @@ if match:
|
|
|
72
72
|
print(f"Start index: {match.start()}") # 0
|
|
73
73
|
print(f"End index: {match.end()}") # 11
|
|
74
74
|
|
|
75
|
+
# Optimized usage
|
|
76
|
+
RE1 = ReRu.compile(r"\d+")
|
|
77
|
+
RE1.is_match(r"\d+", "The answer is 42")
|
|
78
|
+
RE2 = ReRu.compile(r"(\w+) world")
|
|
79
|
+
RE2.search("hello world")
|
|
75
80
|
```
|
|
76
81
|
|
|
77
82
|
### Advanced Configuration
|
|
@@ -97,6 +102,11 @@ match = ReRu.search(r"ERROR", "Critical error occurred", config=config)
|
|
|
97
102
|
if match:
|
|
98
103
|
print("Found error!")
|
|
99
104
|
|
|
105
|
+
# Or
|
|
106
|
+
RE1 = ReRu.compile(r"ERROR", config=config)
|
|
107
|
+
if RE1.match("Critical error occurred"):
|
|
108
|
+
print("Found error!")
|
|
109
|
+
|
|
100
110
|
```
|
|
101
111
|
|
|
102
112
|
## ⚙️ How It Works
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
reru/__init__.py,sha256=NxObr2TsGAshHvjPqEyqs6h6lYecUR7X3iDcMJqOj2w,99
|
|
2
|
+
reru/__init__.pyi,sha256=UEnyo7dVtdzEjcv-c7uYD99aWNwADA9E-qUuVyyJLzo,1134
|
|
3
|
+
reru/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
reru/reru.cp314-win_amd64.pyd,sha256=9CEznaT5mn6bkZ02oM393zoY1oujYkchI-kZ3STQz1g,1759744
|
|
5
|
+
reru-0.1.2.dist-info/METADATA,sha256=AB-anV1ip9bs6tfCHAQR1KPk5dsbpK0j70UrJ5Wn3Ww,5371
|
|
6
|
+
reru-0.1.2.dist-info/WHEEL,sha256=TASrtxyeL-Pi7odwPBMCgR1YebCHdBFZvgqiADG_4b0,97
|
|
7
|
+
reru-0.1.2.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
8
|
+
reru-0.1.2.dist-info/RECORD,,
|
reru-0.1.1.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
reru/__init__.py,sha256=NxObr2TsGAshHvjPqEyqs6h6lYecUR7X3iDcMJqOj2w,99
|
|
2
|
-
reru/__init__.pyi,sha256=GlGL52RKaYvlFwy-FzlfW1YBSELY_ugAuKnOBKe138U,780
|
|
3
|
-
reru/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
reru/reru.cp314-win_amd64.pyd,sha256=ElXK7jZZ4IuS6M5yutkrfV1g32z211GP3Lt7ROxSJgY,2277376
|
|
5
|
-
reru-0.1.1.dist-info/METADATA,sha256=zCqn60q6gBTK5w4hugNP8Qvx6OtKTU3IHTszHptkn-E,5107
|
|
6
|
-
reru-0.1.1.dist-info/WHEEL,sha256=TASrtxyeL-Pi7odwPBMCgR1YebCHdBFZvgqiADG_4b0,97
|
|
7
|
-
reru-0.1.1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
8
|
-
reru-0.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|