Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
^((?:\w+\s?){1,12}).*
/
gm

Description

usefull if you want to return (N) words instead of (N) chars

Submitted by Pavel Dominguez - 9 years ago