Regular Expressions 101

Community Patterns

JS No space title

1

Regular Expression
ECMAScript (JavaScript)

/
(?:^[a-z])(?:\w)*(?:[a-z0-9]$)
/
i

Description

Numbers, letters, and underscore with no special characters, no spaces, no leading number, and no leading or trailing underscore for use in KnockoutJS (or any JS validation).

Submitted by Owen Dismuke - 8 years ago