Regular Expressions 101

Community Patterns

Link Matcher v1

0

Regular Expression
Java 8

"
(?<scheme>https?|s?ftp|wss?|git):\/\/(?<subDomain>[a-z0-9-]{1,63}\.(?:[a-z0-9-]{1,63}\.)*)?(?<domain>[a-z0-9-]{1,256})[.](?<tld>[a-z0-9]+)(?::(?<port>[0-9]{1,5}))?(?<path>\/.*/?)?
"
gm

Description

The link matcher regex currently matches the most common types of links.

*Removed other links

Submitted by IkeVoodoo - a year ago (Last modified a year ago)