Regex para Full URL

    0

    2

    The following code is a regular expression which matches any URL that resolves to a domain that begins with "https" and has either a 6 character domain name or a 2 letter alphanumeric area code followed by 6 digits. In this case, it would match URLs that look like "https://www.google.com", "https://www.yahoo.com", or "https://www.msn.com".

    ^(https?:\/\/)?([\da-z\.-]+\.[a-z\.]{2,6}|[\d\.]+)([\/:?=&#]{1}[\da-z\.-]+)*[\/\?]?$
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.