summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2022-11-21 14:32:42 +0100
committerEike Rathke <erack@redhat.com>2022-11-22 02:45:46 +0100
commit7fa50f5c2f7280129f856f3f9fab85ac047a3e2c (patch)
tree148dbb48642dbf71283cb1b46a0073e5b60a1fc1
parentbcc251fddf6f5be88dc43fba34573d5e3b51a6dd (diff)
Regex: precede every metacharacter or operator with "\"
... not every character. Change-Id: I2c09f164c8b48c5ac4f39203319411aa5c73b490 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/143032 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
-rw-r--r--source/text/shared/00/00000001.xhp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/text/shared/00/00000001.xhp b/source/text/shared/00/00000001.xhp
index 97f683853e..8cad44d154 100644
--- a/source/text/shared/00/00000001.xhp
+++ b/source/text/shared/00/00000001.xhp
@@ -277,7 +277,7 @@
</section>
<paragraph xml-lang="en-US" id="par_id3161659" role="paragraph"><variable id="siehe">See also the following functions:</variable></paragraph>
<section id="regex">
- <paragraph xml-lang="en-US" id="par_id3147418" role="paragraph">The search supports wildcards or <link href="text/shared/01/02100001.xhp" name="regular expressions">regular expressions</link>. With regular expressions enabled, you can enter "all.*", for example to find the first location of "all" followed by any characters. If you want to search for a text that is also a regular expression, you must either precede every character with a "\" character, or enclose the text into \Q...\E. You can switch the automatic evaluation of wildcards or regular expression on and off in <link href="text/shared/optionen/01060500.xhp"><switchinline select="sys"><caseinline select="MAC"><menuitem>%PRODUCTNAME - Preferences</menuitem></caseinline><defaultinline><menuitem>Tools - Options</menuitem></defaultinline></switchinline><menuitem> - %PRODUCTNAME Calc - Calculate</menuitem></link>.</paragraph>
+ <paragraph xml-lang="en-US" id="par_id3147418" role="paragraph">The search supports wildcards or <link href="text/shared/01/02100001.xhp" name="regular expressions">regular expressions</link>. With regular expressions enabled, you can enter "all.*", for example to find the first location of "all" followed by any characters. If you want to search for a text that is also a regular expression, you must either precede every regular expression metacharacter or operator with a "\" character, or enclose the text into \Q...\E. You can switch the automatic evaluation of wildcards or regular expression on and off in <link href="text/shared/optionen/01060500.xhp"><switchinline select="sys"><caseinline select="MAC"><menuitem>%PRODUCTNAME - Preferences</menuitem></caseinline><defaultinline><menuitem>Tools - Options</menuitem></defaultinline></switchinline><menuitem> - %PRODUCTNAME Calc - Calculate</menuitem></link>.</paragraph>
<section id="regexnumex">
<warning id="par_id651572973288601">When using functions where one or more arguments are search criteria strings that represents a regular expression, the first attempt is to convert the string criteria to numbers. For example, ".0" will convert to 0.0 and so on. If successful, the match will not be a regular expression match but a numeric match. However, when switching to a locale where the decimal separator is not the dot makes the regular expression conversion work. To force the evaluation of the regular expression instead of a numeric expression, use some expression that can not be misread as numeric, such as ".[0]" or ".\0" or "(?i).0". </warning>
</section>