mirror of
https://github.com/nushell/nushell.git
synced 2024-11-26 18:33:50 +01:00
489 B
489 B
title | layout | version |
---|---|---|
parse | command | 0.59.1 |
Parse columns from string data using a simple pattern.
Signature
> parse (pattern) --regex
Parameters
pattern
: the pattern to match. Eg) "{foo}: {bar}"--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+)'