Regular Expressions 101

Community Patterns

Community Library Entry

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 - 2 years ago (Last modified 2 years ago)