Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ybgirgin3/Regexes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

14 Commits

Repository files navigation

Regexes

Easy regex finder for Python

## installation

~$ pip install Regexes

Usage:

  • For extracting all possible info from string
from Regexes import Regexes
string = """
Hello My name is Berkay and this is my project
bekxxx3@gmail.com, beskilo@doner.com,
05323450002,
05430000778,
pythoncibeko@bekocanholding.com
"""
ret = Regexes(data=string).find_reg()
print(ret)
# ---------------------------
# {'btc_addresses': [],
# 'credit_cards': [],
# 'dates': [],
# 'emails': ['bekxxx3@gmail.com',
# 'beskilo@doner.com',
# 'pythoncibeko@bekocanholding.com'],
# 'hex_colors': [],
# 'ips': [],
# 'ipv6s': [],
# 'links': ['gmail.com', 'doner.com', 'bekocanholding.com'],
# 'phones': ['05323450002', '05430000778'],
# 'phones_with_exts': [],
# 'po_boxes': [],
# 'prices': [],
# 'ssn_number': [],
# 'street_addresses': [],
# 'times': [],
# 'zip_codes': []}
  • For specific type of info
from Regexes import Regexes
string = """
Hello My name is Berkay and this is my project
bekxxx3@gmail.com, beskilo@doner.com,
05323450002,
05430000778,
pythoncibeko@bekocanholding.com
"""
ret = Regexes(data=string, dtype="emails").find_reg() # * Just add dtype arg
print(ret)
# ---------------------------
# {'emails': ['bekxxx3@gmail.com',
# 'beskilo@doner.com',
# 'pythoncibeko@bekocanholding.com']}

Credit: CommonRegex

Releases

No releases published

Packages

No packages published

Contributors 2

Languages

AltStyle によって変換されたページ (->オリジナル) /