Community Patterns

Community Library Entry

1

Regular Expression
Created·2025-09-20 18:27
Flavor·ECMAScript (JavaScript)

/
^[a-zA--яА-Я0-9]*(-)?(?:[a-zA--яА-Я0-9])*$
/
gm
Open regex in editor

Description

Only one special character ("-") is allowed when entering a word

Submitted by anonymous