Community Patterns

Community Library Entry

1

Regular Expression
Created·2017-04-28 09:36
Flavor·ECMAScript (JavaScript)

/
(((ftp|https?):\/\/)[\-\w@:%_\+.~#?,&\/\/=]+)|((mailto:)?[_.\w-]+@([\w][\w\-]+\.)+[a-zA-Z]{2,3})
/
g
Open regex in editor

Description

extract url such as http, https:, ftp and mailto from a string

Submitted by Kumar Sundaram