Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-02-24 01:41
Flavor·ECMAScript (JavaScript)

/
^mongodb:\/\/[^\/\,]+:{1}[^\/\,]*@{1}.*$
/
mg
Open regex in editor

Description

Test if a mongo db connection string has a username and password declared in it. Doesn't work with with multi host ATM

Submitted by Gecko Pico