Regular Expressions 101

Library entries

regex to check string contains two hyphens

Vote

0

Regular Expression
javascript

/
^([a-zA-Z0-9]*-[a-zA-Z0-9]*){2}$
/
gm

Description

Loading markdown...
Submitted by anonymous - 3 years ago