Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^((?:[^:@\/#\?]+)(?:\:(?:[^:@\/#\?]*))?@){1}
/
gmi

Description

Awesome basic auth parser! Doesn't work if there is a protocol string.

Submitted by anonymous - 8 years ago