[PR #755] [CLOSED] Added expynent to Text Processing #680

Closed
opened 2025-11-06 13:00:22 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/vinta/awesome-python/pull/755
Author: @lk-geimfari
Created: 10/21/2016
Status: Closed

Base: masterHead: patch-3


📝 Commits (1)

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 README.md (+1 -0)

📄 Description

expynent is a tinny library that provides RegEx patterns. This can be useful if you don't want to write regular expression manually.

Usage

Just import the pattern that you want:

import re
import expynent.patterns as expas

if re.match(expas.ZIP_CODE['RU'], '43134'):
    print('match')
else:
    print('not match')

# Output: 'not match'

also you can use compiled patterns:

from expynent.compiled import username

u = input('Enter username: ')

if username.match(u):
    print('valid')
else:
    print('invalid')

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/vinta/awesome-python/pull/755 **Author:** [@lk-geimfari](https://github.com/lk-geimfari) **Created:** 10/21/2016 **Status:** ❌ Closed **Base:** `master` ← **Head:** `patch-3` --- ### 📝 Commits (1) - [`411c92d`](https://github.com/vinta/awesome-python/commit/411c92d848f5948d1229fdc3ae6d4503b3cbf477) Update README.md ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -0) </details> ### 📄 Description **expynent** is a tinny library that provides RegEx patterns. This can be useful if you don't want to write regular expression manually. #### Usage Just import the pattern that you want: ``` python import re import expynent.patterns as expas if re.match(expas.ZIP_CODE['RU'], '43134'): print('match') else: print('not match') # Output: 'not match' ``` also you can use compiled patterns: ``` python from expynent.compiled import username u = input('Enter username: ') if username.match(u): print('valid') else: print('invalid') ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-06 13:00:22 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-python#680