mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 15:14:44 +00:00
[doc] move regex example (#3045)
this example uses regex, so it should not be in the glob examples
This commit is contained in:
parent
7c24369454
commit
432c0058a9
1 changed files with 6 additions and 6 deletions
|
@ -121,6 +121,12 @@ The following subcommands are available:
|
|||
>_ echo 'ok?' | string match '*\\?'
|
||||
>_ \outp{ok?}
|
||||
|
||||
\subsection string-example-match-regex Match Regex Examples
|
||||
|
||||
\fish{cli-dark}
|
||||
>_ string match -r 'cat|dog|fish' 'nice dog'
|
||||
\outp{dog}
|
||||
|
||||
>_ string match -r -v "c.*[12]" {cat,dog}(seq 1 4)
|
||||
\outp{dog1}
|
||||
\outp{dog2}
|
||||
|
@ -130,12 +136,6 @@ The following subcommands are available:
|
|||
\outp{dog4}
|
||||
\endfish
|
||||
|
||||
\subsection string-example-match-regex Match Regex Examples
|
||||
|
||||
\fish{cli-dark}
|
||||
>_ string match -r 'cat|dog|fish' 'nice dog'
|
||||
\outp{dog}
|
||||
|
||||
>_ string match -r '(\\d\\d?):(\\d\\d):(\\d\\d)' \asis{2:34:56}
|
||||
\outp{2:34:56}
|
||||
\outp{2}
|
||||
|
|
Loading…
Reference in a new issue