### Common Regex
A python package that provides commonly used regular expressions for validating various types of data.
#### Installation
`pip install pycommonregex`
#### Usage
```python
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/fadedreams/pycommonregex",
"name": "pycommonregex",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "regex,utilities",
"author": "fadedreams7",
"author_email": "fadedreams7@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/45/74/228b0aceb41e27b2cc1eadf3bfa76de1403e490795060d5db28250a3200e/pycommonregex-0.1.2.tar.gz",
"platform": null,
"description": "### Common Regex\n\nA python package that provides commonly used regular expressions for validating various types of data.\n\n#### Installation\n\n`pip install pycommonregex`\n\n#### Usage\n\n```python\nimport re\nfrom pycommonregex import *\n\nprint(is_int(5)) # True\nprint(is_positive_int('5')) # True\nprint(is_decimal_num('5.5')) # True\nprint(is_num('-5.5')) # True\nprint(is_alpha_numeric('abc123')) # True\nprint(is_alpha_numeric_with_space('abc 123')) # True\nprint(is_email('email@example.com')) # True\nprint(is_good_password('Abc123#')) # True\nprint(is_username('abc_123')) # True\nprint(is_url('https://www.example.com')) # True\nprint(is_ipv4('127.0.0.1')) # True\nprint(is_ipv6('::1')) # True\n\n```\n\n#### Functions\n\n- 'is_int(num)': Check if the given input is an integer.\n- 'is_positive_int(s)': Check if the given input is a positive integer.\n- 'is_decimal_num(s)': Check if the given input is a decimal number.\n- 'is_num(s)': Check if the given input is a number (positive or negative).\n- 'is_alpha_numeric(s)': Check if the given input is alphanumeric (only contains letters and numbers).\n- 'is_alpha_numeric_with_space(s)': Check if the given input is alphanumeric (only contains letters, numbers, and spaces).\n- 'is_email(email)': Check if the given input is a valid email address.\n- '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).\n- '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).\n- 'is_url(url)': Check if the given input is a valid URL.\n- 'is_ipv4(IPv4)': Check if the given input is a valid IPv4 address.\n- 'is_ipv6(address)': Check if the given input is a valid IPv6 address.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python package for common regular expressions.",
"version": "0.1.2",
"split_keywords": [
"regex",
"utilities"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e547471eef3a6beeb44424514f63f606f3434d22dbc45d1d9d66fcc74227cf38",
"md5": "54bcd59e290894ff7fbdffb312d3316d",
"sha256": "d087e0998093c9f2e31c20d87689d7490d70891b11f46b8ee561cd57c393536c"
},
"downloads": -1,
"filename": "pycommonregex-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "54bcd59e290894ff7fbdffb312d3316d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 3980,
"upload_time": "2023-01-23T16:07:19",
"upload_time_iso_8601": "2023-01-23T16:07:19.012932Z",
"url": "https://files.pythonhosted.org/packages/e5/47/471eef3a6beeb44424514f63f606f3434d22dbc45d1d9d66fcc74227cf38/pycommonregex-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4574228b0aceb41e27b2cc1eadf3bfa76de1403e490795060d5db28250a3200e",
"md5": "6f1906eec7d3939f92ea7f879a52d69e",
"sha256": "a5fac23d90477ec2957b89c34771fd92114e2b69f2bade4854ce88542745683f"
},
"downloads": -1,
"filename": "pycommonregex-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "6f1906eec7d3939f92ea7f879a52d69e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 3783,
"upload_time": "2023-01-23T16:07:21",
"upload_time_iso_8601": "2023-01-23T16:07:21.820401Z",
"url": "https://files.pythonhosted.org/packages/45/74/228b0aceb41e27b2cc1eadf3bfa76de1403e490795060d5db28250a3200e/pycommonregex-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-23 16:07:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "fadedreams",
"github_project": "pycommonregex",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pycommonregex"
}