Community Patterns

Community Library Entry

0

Regular Expression
Created·2019-11-10 15:35
Flavor·ECMAScript (JavaScript)

/
^\s+(?:\-(?<letter>\w)\,?\s+)?(?:\-\-(?<name>\S+)(?:\[?[ =](?<value>\S+)\]?)?)?\s+(?<text>.*)$
/
gm
Open regex in editor

Description

Extracts the flag option information from a bash 'COMMAND --help'.

Submitted by anonymous