For the complete documentation index, see llms.txt. This page is also available as Markdown.

🔗link

link(link: string): { 
    include: boolean, 
    matchs: RegExpMatchArray | null, 
    groups: Array<{ 
        protocol: string | undefined,
        auth: string | undefined,
        username: string | undefined,
        password: string | undefined,
        alldomain: string,
        subdomain: string | undefined,
        domain: string,
        extension: string,
        ipadress: string | undefined,
        port: string | undefined,
        route: string | undefined,
        filename: string | undefined,
        query: string | undefined,
        anchor: string | undefined,
    } | null> | null
}

Search e-mail in a string:

const { web } = require('regex-simplify');

const link = web.link(`
    https://discord.gg/test/image.png?query=test#anchor
    http://192.168.1.1
    http://192.168.1.1:5555
    http://username:password@domain.com
`);

console.log(link);

And here what return the function:

Last updated