docs: Update docs for regexp functions.
Refer to the function parameters more explicitly in the description
text.
@@ -36,10 +36,10 @@ String
Find the first regular expression match in a string.
- Given an input string and a regular expression string find the
- first match for the regular expression within the string. Return
- the match, each match represented by an :eql:type:`array\<str\>`
- of matched groups.
+ Given an input *string* and a regular expression *pattern* find
+ the first match for the regular expression within the *string*.
+ Return the match, each match represented by an
+ :eql:type:`array\<str\>` of matched groups.
.. code-block:: edgeql-repl
@@ -53,17 +53,17 @@ String
Find all regular expression matches in a string.
- Given an input string and a regular expression string repeatedly
- match the regular expression within the string. Return the set of
- all matches, each match represented by an :eql:type:`array\<str\>`
- of matched groups.
+ Given an input *string* and a regular expression *pattern*
+ repeatedly match the regular expression within the *string*.
+ Return the set of all matches, each match represented by an
+ :eql:type:`array\<str\>` of matched groups.
.. code-block:: edgeql-repl
db> SELECT std::re_match_all(r'a\w+', 'an abstract concept');
{['an'], ['abstract']}
-.. eql:function:: std::re_replace(pattern: str, repl: str, \
+.. eql:function:: std::re_replace(pattern: str, sub: str, \
string: str, \
NAMED ONLY flags: str='') \
-> str
@@ -72,15 +72,16 @@ String
Replace matching substrings in a given string.
- Given an input string and a regular expression string replace
- matching substrings with the replacement string. Optional
+ Given an input *string* and a regular expression *pattern* replace
+ matching substrings with the replacement string *sub*. Optional
:ref:`flag <string_regexp_flags>` argument can be used to specify
additional regular expression flags. Return the string resulting
from substring replacement.
.. code-block:: edgeql-repl
- db> SELECT std::re_replace(r'l', r'L', 'Hello World', flags := 'g');
+ db> SELECT std::re_replace(r'l', r'L', 'Hello World',
+ flags := 'g');
{'HeLLo WorLd'}
.. eql:function:: std::re_test(pattern: str, string: str) -> bool
@@ -89,9 +90,10 @@ String
Test if a regular expression has a match in a string.
- Given an input string and a regular expression string test whether
- there is a match for the regular expression within the string.
- Return ``True`` if there is a match, ``False`` otherwise.
+ Given an input *string* and a regular expression *pattern* test
+ whether there is a match for the regular expression within the
+ *string*. Return ``True`` if there is a match, ``False``
+ otherwise.
.. code-block:: edgeql-repl
