mirror of
https://github.com/nushell/nushell.git
synced 2024-11-25 09:53:43 +01: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
@ -19,7 +19,7 @@ impl Command for Parse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn search_terms(&self) -> Vec<&str> {
|
fn search_terms(&self) -> Vec<&str> {
|
||||||
vec!["pattern", "match", "regex"]
|
vec!["pattern", "match", "regex", "str extract"]
|
||||||
}
|
}
|
||||||
|
|
||||||
fn signature(&self) -> nu_protocol::Signature {
|
fn signature(&self) -> nu_protocol::Signature {
|
||||||
|
Loading…
Reference in New Issue
Block a user