Skip to main content

Common Regex

A python package that provides commonly used regular expressions for validating various types of data.

Installation

pip install pycommonregex

Usage

import re
from pycommonregex import *

print(is_int(5)) # True
print(is_positive_int('5')) # True
print(is_decimal_num('5.5')) # True
print(is_num('-5.5')) # True
print(is_alpha_numeric('abc123')) # True
print(is_alpha_numeric_with_space('abc 123')) # True
print(is_email('email@example.com')) # True
print(is_good_password('Abc123#')) # True
print(is_username('abc_123')) # True
print(is_url('https://www.example.com')) # True
print(is_ipv4('127.0.0.1')) # True
print(is_ipv6('::1')) # True

Functions

  • 'is_int(num)': Check if the given input is an integer.
  • 'is_positive_int(s)': Check if the given input is a positive integer.
  • 'is_decimal_num(s)': Check if the given input is a decimal number.
  • 'is_num(s)': Check if the given input is a number (positive or negative).
  • 'is_alpha_numeric(s)': Check if the given input is alphanumeric (only contains letters and numbers).
  • 'is_alpha_numeric_with_space(s)': Check if the given input is alphanumeric (only contains letters, numbers, and spaces).
  • 'is_email(email)': Check if the given input is a valid email address.
  • 'is_good_password(password)': Check if the given input is a strong password (contains at least 1 uppercase letter, 1 lowercase letter, 1 number, and 1 special character, and is at least 8 characters long).
  • 'is_username(username)': Check if the given input is a valid username (contains only letters, numbers, and certain special characters, and is between 4 and 20 characters long).
  • 'is_url(url)': Check if the given input is a valid URL.
  • 'is_ipv4(IPv4)': Check if the given input is a valid IPv4 address.
  • 'is_ipv6(address)': Check if the given input is a valid IPv6 address.

Metadata

Release files for pycommonregex 0.1.2

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

Source distribution (sdist)

Source distribution for pycommonregex 0.1.2
File Size Uploaded Provenance
pycommonregex-0.1.2.tar.gz 3.8 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 7.8 kB

Release files / pycommonregex-0.1.2.tar.gz

Download URL pycommonregex-0.1.2.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a5fac23d90477ec2957b89c34771fd92114e2b69f2bade4854ce88542745683f
BLAKE2b-256 checksum
How to use checksums
4574228b0aceb41e27b2cc1eadf3bfa76de1403e490795060d5db28250a3200e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.6 Linux/5.10.16.3-microsoft-standard-WSL2

Release files / pycommonregex-0.1.2-py3-none-any.whl

Download URL pycommonregex-0.1.2-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d087e0998093c9f2e31c20d87689d7490d70891b11f46b8ee561cd57c393536c
BLAKE2b-256 checksum
How to use checksums
e547471eef3a6beeb44424514f63f606f3434d22dbc45d1d9d66fcc74227cf38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.6 Linux/5.10.16.3-microsoft-standard-WSL2

Security for pycommonregex 0.1.2

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.1.2 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