Skip to content
This repository has been archived by the owner on Dec 24, 2021. It is now read-only.
Lk Geimfari edited this page Dec 6, 2016 · 5 revisions

Build Status PyPI version

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

Installation

~ git clone https://github.com/lk-geimfari/expynent.git
➜  ~ cd expynent/
➜  ~ python setup.py install

or

~  pip install expynent

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')
Clone this wiki locally