Regular Expressions 101

Community Patterns

curl-to-dev-tools--put

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' - 3 years ago