Community Patterns

Community Library Entry

1

Regular Expression
Created·2016-02-05 17:33
Flavor·PCRE (Legacy)

/
((https?:\/\/|(ftp:\/\/)).*|(.*\.[^\.]{2,6})(\/.*)?)(\:.*)?$
/
gm
Open regex in editor

Description

Regex for http/https/ftp or only domain url

Examples: https://example.domain/page?=78 http://example.domain/page?=78 ftp://192.168.0.1:80 example.domain example.domain:80/test

Submitted by Adrien H