Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
Created·2016-08-04 19:38
Flavor·ECMAScript (JavaScript)

/
^(?![\.-])([\w-\.]+(@\d+(\.\d+){0,2})?(-\w+(\.\d+){0,3})?)$
/
mg
Open regex in editor

Description

Validate npm libraries in the format library-name@version

Submitted by Mateo Guzman