Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
\b(https?|ftp|file)://\S+
/
g

Description

Finds URLs in a larger body of text. URLs may or may not be enclosed in punctuation, such as parentheses, that are not part of the URL.

Submitted by D0nB1z - 10 years ago