Regular Expressions 101

Community Patterns

1...45678...901

Community Library Entry

16

Regular Expression
ECMAScript (JavaScript)

/
^((https?:)(\/\/\/?)([\w]*(?::[\w]*)?@)?([\d\w\.-]+)(?::(\d+))?)?([\/\\\w\.()-]*)?(?:([?][^#]*)?(#.*)?)*
/
gmi

Description

general purpose HTTP URL regex

Submitted by Miguel Castillo @manchagnu - 9 years ago