Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
curl.+(\d).+\s*.+(\d{4}-\d{2}.+)\",\s*\".+\"\s*\:\s*\"([a-zA-z]*)\",
/
gm

Description

Take a text of curl command and regex them down to a list of objects with named identifiers, such as id, date, and action.

Submitted by Tre' - 4 years ago