Regular Expressions 101

Community Patterns

Get the command

1

Regular Expression
ECMAScript (JavaScript)

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

Description

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

Submitted by anonymous - 9 years ago