Move builtins.match documentation between map and mul.
This commit is contained in:
parent
f76e85d8f5
commit
27417c6160
|
@ -210,42 +210,6 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><function>builtins.match</function>
|
|
||||||
<replaceable>regex</replaceable> <replaceable>str</replaceable></term>
|
|
||||||
|
|
||||||
<listitem><para>Returns a list if the <link
|
|
||||||
xlink:href="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04">extended
|
|
||||||
POSIX regular expression</link> <replaceable>regex</replaceable>
|
|
||||||
matches <replaceable>str</replaceable> precisely, otherwise returns
|
|
||||||
<literal>null</literal>. Each item in the list is a regex group.
|
|
||||||
|
|
||||||
<programlisting>
|
|
||||||
builtins.match "ab" "abc"
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
Evaluates to <literal>null</literal>.
|
|
||||||
|
|
||||||
<programlisting>
|
|
||||||
builtins.match "abc" "abc"
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
Evaluates to <literal>[ ]</literal>.
|
|
||||||
|
|
||||||
<programlisting>
|
|
||||||
builtins.match "a(b)(c)" "abc"
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
Evaluates to <literal>[ "b" "c" ]</literal>.
|
|
||||||
|
|
||||||
<programlisting>
|
|
||||||
builtins.match "[[:space:]]+([[:upper:]]+)[[:space:]]+" " FOO "
|
|
||||||
</programlisting>
|
|
||||||
|
|
||||||
Evaluates to <literal>[ "foo" ]</literal>.
|
|
||||||
|
|
||||||
</para></listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry><term><function>builtins.elem</function>
|
<varlistentry><term><function>builtins.elem</function>
|
||||||
<replaceable>x</replaceable> <replaceable>xs</replaceable></term>
|
<replaceable>x</replaceable> <replaceable>xs</replaceable></term>
|
||||||
|
|
||||||
|
@ -726,6 +690,42 @@ map (x: "foo" + x) [ "bar" "bla" "abc" ]</programlisting>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
|
||||||
|
<varlistentry><term><function>builtins.match</function>
|
||||||
|
<replaceable>regex</replaceable> <replaceable>str</replaceable></term>
|
||||||
|
|
||||||
|
<listitem><para>Returns a list if the <link
|
||||||
|
xlink:href="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04">extended
|
||||||
|
POSIX regular expression</link> <replaceable>regex</replaceable>
|
||||||
|
matches <replaceable>str</replaceable> precisely, otherwise returns
|
||||||
|
<literal>null</literal>. Each item in the list is a regex group.
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
builtins.match "ab" "abc"
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
Evaluates to <literal>null</literal>.
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
builtins.match "abc" "abc"
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
Evaluates to <literal>[ ]</literal>.
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
builtins.match "a(b)(c)" "abc"
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
Evaluates to <literal>[ "b" "c" ]</literal>.
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
builtins.match "[[:space:]]+([[:upper:]]+)[[:space:]]+" " FOO "
|
||||||
|
</programlisting>
|
||||||
|
|
||||||
|
Evaluates to <literal>[ "foo" ]</literal>.
|
||||||
|
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry><term><function>builtins.mul</function>
|
<varlistentry><term><function>builtins.mul</function>
|
||||||
<replaceable>e1</replaceable> <replaceable>e2</replaceable></term>
|
<replaceable>e1</replaceable> <replaceable>e2</replaceable></term>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue