aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src
diff options
context:
space:
mode:
authorGravatar James Campos <james.r.campos@gmail.com>2016-05-20 06:57:29 -0700
committerGravatar Fabian Homborg <FHomborg@gmail.com>2016-05-20 15:57:29 +0200
commit432c0058a9d39412038556fe4d43f9240e5c85bb (patch)
tree979db90ba19de7f27db23757695ae6e2615343fd /doc_src
parent7c243694549cc1d6776873c8a97c99fc5889b68d (diff)
[doc] move regex example (#3045)
this example uses regex, so it should not be in the glob examples
Diffstat (limited to 'doc_src')
-rw-r--r--doc_src/string.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/doc_src/string.txt b/doc_src/string.txt
index 31677858..2306678a 100644
--- a/doc_src/string.txt
+++ b/doc_src/string.txt
@@ -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}