nushell/docs/commands/parse.md
Fernando Herrera dbcadbc12c moved folders
2022-02-07 19:23:12 +00:00

501 B

parse

Parse columns from string data using a simple pattern.

Usage

> parse <pattern> {flags} 

Parameters

  • <pattern> the pattern to match. Eg) "{foo}: {bar}"

Flags

  • -h, --help: Display this help message
  • -r, --regex: use full regex syntax for patterns

Examples

Parse a string into two named columns

> echo "hi there" | parse "{foo} {bar}"

Parse a string using regex pattern

> echo "hi there" | parse -r "(?P<foo>\w+) (?P<bar>\w+)"