Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
^[\s]+([\w]+)
/

Description

Simply gets the command from a script command, automatically removes unwanted spaces.

Submitted by anonymous - 10 years ago