aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc
diff options
context:
space:
mode:
authorVance Shipley <[email protected]>2012-04-04 18:17:33 +0530
committerHenrik Nord <[email protected]>2012-07-10 14:58:54 +0200
commit264e667b86381528131c45c9b6e8f54ad168c73f (patch)
tree9e13064162e668b38ffc867de62350e92336e93a /lib/stdlib/doc
parentc075ac6484e3d5a93a0d870ab4483d39ae26eaec (diff)
downloadotp-264e667b86381528131c45c9b6e8f54ad168c73f.tar.gz
otp-264e667b86381528131c45c9b6e8f54ad168c73f.tar.bz2
otp-264e667b86381528131c45c9b6e8f54ad168c73f.zip
extend re back reference syntax with \g escape sequence
Add the \gN and \g{N} syntax for back references in re:replace/3,4 to allow use with numeric replacement strings.
Diffstat (limited to 'lib/stdlib/doc')
-rw-r--r--lib/stdlib/doc/src/re.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/stdlib/doc/src/re.xml b/lib/stdlib/doc/src/re.xml
index 6d5336796c..224b4b2771 100644
--- a/lib/stdlib/doc/src/re.xml
+++ b/lib/stdlib/doc/src/re.xml
@@ -524,8 +524,8 @@ This option makes it possible to include comments inside complicated patterns. N
<p>The replacement string can contain the special character
<c>&amp;</c>, which inserts the whole matching expression in the
- result, and the special sequence <c>\</c>N (where N is an
- integer &gt; 0), resulting in the subexpression number N will be
+ result, and the special sequence <c>\</c>N (where N is an integer &gt; 0),
+ <c>\g</c>N or <c>\g{</c>N<c>}</c> resulting in the subexpression number N will be
inserted in the result. If no subexpression with that number is
generated by the regular expression, nothing is inserted.</p>
<p>To insert an <c>&amp;</c> or <c>\</c> in the result, precede it