Skip to main content

ezptn

Overview

  • String pattern matching with placeholders.
  • プレースホルダーを使った文字列パターンマッチ

Usage

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')]

Metadata

Release files for ezptn 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ezptn 0.0.1
File Size Uploaded Provenance Actions
ezptn-0.0.1.tar.gz 2.8 kB Without provenance Details for ezptn-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ezptn 0.0.1
File Interpreter ABI Platform Actions
ezptn-0.0.1-py3-none-any.whl Python 3 none any Details for ezptn-0.0.1-py3-none-any.whl

Total release size: 6.0 kB

Release files / ezptn-0.0.1.tar.gz

Download URL ezptn-0.0.1.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
24a5a9f8de44f500008d8cff138a8f71f9559f2240345cf65b3215ec89e16685
BLAKE2b-256 checksum
How to use checksums
f2cba5792179c6fdf3b442260d516bd3ef0e3621c20507fae3a6e4e3f734dee0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.8.8

Release files / ezptn-0.0.1-py3-none-any.whl

Download URL ezptn-0.0.1-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59756ea38cfbbaa3cbdad3999043a1c2d41bf86ef8cce4402571d21676d28d1a
BLAKE2b-256 checksum
How to use checksums
23f5cc6f639e3581fbf3a02f1bf85fc95639e37366b5f782ed88978be210fb6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.8.8

Security for ezptn 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page