ezptn-0.0.0
توضیحات
String pattern matching with placeholders.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | ezptn-0.0.0 |
| نام | ezptn |
| نسخه کتابخانه | 0.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | le_lattelle |
| ایمیل نویسنده | g.tiger.ml@gmail.com |
| آدرس صفحه اصلی | https://github.co.jp/ |
| آدرس اینترنتی | https://pypi.org/project/ezptn/ |
| مجوز | CC0 v1.0 |
# ezptn
## Overview
- String pattern matching with placeholders.
- プレースホルダーを使った文字列パターンマッチ
## Usage
```python
import ezptn
res = ezptn.match("lambda %s: %s", "lambda a: a ** 2")
print(res) # -> [('a', 'a ** 2')]
res = ezptn.match("%s:%s", "13:12:24")
print(res) # -> [('13', '12:24'), ('13:12', '24')]
res = ezptn.match("%s--%s", "hoge-fuga")
print(res) # -> []
res = ezptn.match("%squid", "equid")
print(res) # -> [('e',)]
res = ezptn.match("%s(%s)", "hoge(22)")
print(res) # -> [('hoge', '22')]
res = ezptn.match("%s(%s)", "hoge()")
print(res) # -> [('hoge', '')]
res = ezptn.match("%s(%s)", "hoge()", allow_empty = False)
print(res) # -> []
res = ezptn.match("(%s,((%s,%s),%s))", '(23,(("s",44),44))')
print(res) # -> [('23', '"s"', '44', '44')]
```
نیازمندی
| مقدار | نام |
|---|---|
| - | relpath |
| - | ezpip |
| - | sout |
نحوه نصب
نصب پکیج whl ezptn-0.0.0:
pip install ezptn-0.0.0.whl
نصب پکیج tar.gz ezptn-0.0.0:
pip install ezptn-0.0.0.tar.gz