{"id":20021863,"url":"https://github.com/kunal00000/regular-expressions_regex","last_synced_at":"2026-03-19T13:05:12.201Z","repository":{"id":174877885,"uuid":"652874459","full_name":"kunal00000/Regular-Expressions_regex","owner":"kunal00000","description":"The ReadyRegex repository is a comprehensive collection of ready-to-use regular expressions (regex) for various common tasks.","archived":false,"fork":false,"pushed_at":"2023-06-16T13:33:06.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T03:43:15.129Z","etag":null,"topics":["regex","regex-match","regex-validator","regexp"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kunal00000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-13T01:13:52.000Z","updated_at":"2023-10-30T18:51:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"28530e5f-181e-4b0b-b87a-e8a29480fd87","html_url":"https://github.com/kunal00000/Regular-Expressions_regex","commit_stats":null,"previous_names":["kunal00000/regular-expressions_regex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kunal00000/Regular-Expressions_regex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunal00000%2FRegular-Expressions_regex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunal00000%2FRegular-Expressions_regex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunal00000%2FRegular-Expressions_regex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunal00000%2FRegular-Expressions_regex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kunal00000","download_url":"https://codeload.github.com/kunal00000/Regular-Expressions_regex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kunal00000%2FRegular-Expressions_regex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30164532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T04:43:31.446Z","status":"ssl_error","status_checked_at":"2026-03-06T04:40:30.133Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["regex","regex-match","regex-validator","regexp"],"created_at":"2024-11-13T08:38:27.505Z","updated_at":"2026-03-06T06:05:07.143Z","avatar_url":"https://github.com/kunal00000.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Regular-Expressions_regex\nThe Ready to use Regex repository is a comprehensive collection of ready-to-use regular expressions (regex) for various common tasks. This repository aims to provide a valuable resource for developers, data analysts, and anyone working with text data, by offering a wide range of regex patterns specifically designed for tasks such as email validation, phone number parsing, credit card number recognition, and more.\n\n1. [Whitespaces](#whitespace)\n2. [Phone Number (various formats)](#phone-numbers)\n    1. [Validating phone numbers in various formats](#validate-phone)\n    2. [Normalizing phone numbers to a consistent format:](#normalise-phone)\n3. [Email Addresses](#email-addresses)\n    1. [Validating email addresses:](#validate-email)\n    2. [Extracting domain names from email addresses:](#extract-domain)\n4. [URLs](#urls)\n    1. [Validating URLs:](#validate-url)\n    2. [Extract Protocol](#extract-protocol)\n    3. [Extract Domain](#extract-domain)\n    4. [Extract Path](#extract-path)\n    5. [Extract Query Parameters](#extract-params)\n5. [Data Extraction](#data-extraction)\n    1. [To extract dates:](#extract-dates)\n    2. [To extract time:](#extract-times)\n    3. [To extract address:](#extract-address)\n    4. [To extract values from XML:](#extract-xml)\n6. [Credit Card](#credit-card)\n    1. [Validating credit card numbers:](#validate-credit)\n    2. [Extracting credit card expiration dates:](#extract-expiry-date)\n    3. [Matching CVV (Card Verification Value) codes:](#extract-cvv) \n\n\u003ca id=\"whitespace\"\u003e\u003c/a\u003e\n### Whitespace\n- Regex:\n  ```\n  \\s+\n  ```\n\n\u003ca id=\"phone-numbers\"\u003e\u003c/a\u003e\n### Phone Numbers\n\u003ca id=\"validate-phone\"\u003e\u003c/a\u003e\n- Validating phone numbers in different formats-\n  - Regex pattern:\n    ```\n    ^(?:\\+\\d{1,3}\\s?)?(?:\\(\\d{1,4}\\)\\s?)?(?:\\d{1,4}[\\s-])?\\d{1,10}$\n    ```\n  - Example formats:\n    - +1 (123) 456-7890\n    - 5551234567\n    - (999) 9999-9999\n    - +1 5551234567\n    - +1 (416) 555 7890\n    - +33 123456789\n    - +91 9876543210\n    - \n\u003ca id=\"normalise-phone\"\u003e\u003c/a\u003e\n- Normalizing phone numbers to a consistent format:\n\n  - Regex pattern:\n    ```\n    ^(\\+?\\d{1,3}\\s?)?(\\(?\\d{1,4}\\)?\\s?)?(\\d{1,})[-\\s]?(\\d{1,})$\n    ```\n  - Example formats:\n    - +1 (123) 456-7890 (normalizes to +11234567890)\n    - 555 123 4567 (normalizes to 5551234567)\n    - +55 (11) 98765-4321 (normalizes to 5511987654321)\n    - +86 10 1234 5678 (normalizes to +861012345678\n    - +91 98765 43210 (normalizes to +919876543210)\n\n\u003ca id=\"email-addresses\"\u003e\u003c/a\u003e\n### Email Addresses\n\u003ca id=\"validate-email\"\u003e\u003c/a\u003e\n- Validating email addresses:\n  - Regex pattern:\n    ```\n    ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$\n    ```\n  - Example formats:\n    - john.doe@example.com\n    - jane_smith123@gmail.com\n\u003ca id=\"extract-domain\"\u003e\u003c/a\u003e\n- Extracting domain names from email addresses:\n  - Regex pattern:\n    ```\n    @[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$\n    ```\n  - Example formats:\n    - john.doe@example.com (extracts example.com)\n    - jane_smith123@gmail.com (extracts gmail.com)\n\n\u003ca id=\"urls\"\u003e\u003c/a\u003e\n### URLs\n\u003ca id=\"validate-url\"\u003e\u003c/a\u003e\n- Validating URLs:\n    - Regex pattern:\n      ```\n      https?:\\/\\/[\\w.-]+\\.[\\w.-]+[^\\s]*\n      ```\n    - Example formats:\n      - https://www.example.com\n      - http://ftp.example.com/file.txt\n\n\u003ca id=\"extract-comp\"\u003e\u003c/a\u003e\n- Extracting different components of a URL(https://www.example.com/path/file.html?param1=value1\u0026param2=value2):\n\u003ca id=\"extract-protocol\"\u003e\u003c/a\u003e\n  - Extracting protocol:\n    - Regex pattern:\n      ```\n      ^(https?):\\/\\/\n      ```\n    - Example format:\n      - https://\n      - http://\n  \u003ca id=\"extract-domain\"\u003e\u003c/a\u003e\n  - Extracting domain:\n    - Regex pattern:\n      ```\n      (https?):\\/\\/([a-zA-Z0-9.-]+)\n      ```\n    - Example format:\n      - www.example.com\n      - www.google.com\n  \u003ca id=\"extract-path\"\u003e\u003c/a\u003e\n  - Extracting path:\n    - Regex pattern:\n      ```\n      (https?):\\/\\/[a-zA-Z0-9.-]+(\\/[^?\\s]*)?\n      ```\n    - Example format:\n      - /path/file.html\n  \u003ca id=\"extract-params\"\u003e\u003c/a\u003e\n  - Extracting query parameters:\n    - Regex pattern:\n      ```\n      (https?):\\/\\/[a-zA-Z0-9.-]+(\\/[^?\\s]*)?(\\?[^#\\s]*)?$\n      ```\n    - Example format:\n      - ?param1=value1\u0026param2=value2\n    - Extracted Groups:\n      - https\n      - /path/file.html\n      - ?param1=value1\u0026param2=value2\n\n\u003ca id=\"data-extraction\"\u003e\u003c/a\u003e\n### Data Extraction\n\n- Extracting specific patterns from unstructured text:\n\u003ca id=\"extract-dates\"\u003e\u003c/a\u003e\n  - To extract dates:\n    ```\n    (\\d{1,2})\\/(\\d{1,2})\\/(\\d{4})\n    ```\n    - Example:\n      - Extract \"12/31/2023\" from a text.\n  \u003ca id=\"extract-times\"\u003e\u003c/a\u003e\n  - To extract times:\n    ```\n    ([01]\\d|2[0-3]):([0-5]\\d)\n    ```\n    - Example:\n      - Extract \"18:45\" from a text.\n  \u003ca id=\"extract-address\"\u003e\u003c/a\u003e\n  - To extract addresses:\n    ```\n    \\d+\\s[A-Za-z]+\\s[A-Za-z]+,\\s[A-Za-z]+\\s\\d+\n    ```\n    - Example:\n      - Extract \"123 Main St, New York 10001\" from a text.\n     \n- Extracting values from structured data formats:\n  \u003ca id=\"extract-xml\"\u003e\u003c/a\u003e\n  - To extract values from XML:\n    ```\n    \u003c(.*?)\u003e([^\u003c]+)\u003c\\/\\1\u003e\n    ```\n    - Example:\n      - Extract values between XML tags, such as\n      ```\n      # data\n      \u003cperson\u003e\n        \u003cname\u003eJohn Doe\u003c/name\u003e\n        \u003cage\u003e25\u003c/age\u003e\n        \u003cemail\u003ejohndoe@example.com\u003c/email\u003e\n      \u003c/person\u003e\n\n      # Expected  Results \n      name John Doe\n      age 25\n      email johndoe@example.com\n      ```\n\n\u003ca id=\"credit-card\"\u003e\u003c/a\u003e\n### Credit Card\n\u003ca id=\"validate-credit\"\u003e\u003c/a\u003e\n- Validating credit card numbers:\n  - Regex Pattern: \n    ```\n    ^(?:\\d{4}[ -]?){3}\\d{4}$\n    ```\n    - Example Credit Card Numbers:\n      - 4111 1111 1111 1111\n      - 5555-5555-5555-4444\n      - 3782822463100058\n\u003ca id=\"extract-expiry-date\"\u003e\u003c/a\u003e\n- Extracting credit card expiration dates:\n  - Regex Pattern:\n    ```\n    (?:0[1-9]|1[0-2])\\/20[2-9][0-9]\n    ```\n    - Example Expiration Dates:\n      - 12/2023\n      - 05/2025\n      - 09/2030\n\u003ca id=\"extract-cvv\"\u003e\u003c/a\u003e\n- Matching CVV (Card Verification Value) codes:\n  - Regex Pattern:\n    ```\n    ^\\d{3,4}$\n    ```\n    - Example CVV Codes:\n      - 123\n      - 7890\n      - 4321\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkunal00000%2Fregular-expressions_regex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkunal00000%2Fregular-expressions_regex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkunal00000%2Fregular-expressions_regex/lists"}