mirror of
https://github.com/nushell/nushell
synced 2024-12-28 14:03:09 +00:00
add search_term "str extract" to parse
command (#12600)
# Description For a long time, I was searching for the `str extract` command to extract regexes from strings. I often painfully used `str replace -r '(.*)(pattern_to_find)(.*)' '$2'` for such purposes. Only this morning did I realize that `parse` is what I needed for so many times, which I had only used for parsing data in tables.
This commit is contained in:
parent
5e52bd77e0
commit
5fd34320e9
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ impl Command for Parse {
|
|||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["pattern", "match", "regex"]
|
||||
vec!["pattern", "match", "regex", "str extract"]
|
||||
}
|
||||
|
||||
fn signature(&self) -> nu_protocol::Signature {
|
||||
|
|
Loading…
Reference in a new issue