Regular Expressions 101

Community Library

Community Library Entry

1

Regular ExpressionOpen Workspace

/
(?<!=\")\b((?:http|https|ftp):\/\/)((?:(?:\w)+\.)+(?:\w)+)(:\d+)?((?:\/[\w]+)*[.\w]*\/?)((?:[\?\w\=\_\-%+!$^*\/\\@#;:]|(?:&(?!gt;)|(?:['"](?=[\w"'&#,]))))*)
/
g

Description
Created·2015-06-02 05:56
Type·Match
Flavor·PCRE (Legacy)

simple url regex which also prevents capture of a trailing ">" (the html representation of ">")

Submitted by Erich Spaker
Open Workspace