[Libreoffice-commits] help.git: source/text

Jay Bingham (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 4 22:59:03 UTC 2019


 source/text/shared/01/02100001.xhp |  257 ++++++++++++++++++++++++-------------
 1 file changed, 167 insertions(+), 90 deletions(-)

New commits:
commit 41a83520a0f8a1a84619324291d3b1c1e2a2ee15
Author:     Jay Bingham <binghamjc at msn.com>
AuthorDate: Mon Jun 3 13:59:33 2019 -0300
Commit:     Olivier Hallot <olivier.hallot at libreoffice.org>
CommitDate: Wed Jun 5 00:58:43 2019 +0200

    Refactor RegExp Help page with improved contents
    
    1) Mute some l10n strings
    
    Change-Id: Ia7a2c1898491c0f0352c9c8df519bba057b3bab6
    Reviewed-on: https://gerrit.libreoffice.org/73408
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/source/text/shared/01/02100001.xhp b/source/text/shared/01/02100001.xhp
index b4d037dd5..1f4b2dc77 100644
--- a/source/text/shared/01/02100001.xhp
+++ b/source/text/shared/01/02100001.xhp
@@ -27,6 +27,11 @@
 <body>
 <bookmark xml-lang="en-US" branch="index" id="bm_id3146765">
 <bookmark_value>regular expressions; list of</bookmark_value>
+<bookmark_value>regular expressions; new line</bookmark_value>
+<bookmark_value>regular expressions; empty paragraph</bookmark_value>
+<bookmark_value>regular expressions; begin of word</bookmark_value>
+<bookmark_value>regular expressions; begin of paragraph</bookmark_value>
+<bookmark_value>regular expressions; end of paragraph</bookmark_value>
 <bookmark_value>lists; regular expressions</bookmark_value>
 <bookmark_value>replacing; tab stops (regular expressions)</bookmark_value>
 <bookmark_value>tab stops; regular expressions</bookmark_value>
@@ -37,10 +42,10 @@
 <table id="tbl_id3149517">
   <tablerow>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3149741" role="tablehead">Character</paragraph>
+      <paragraph xml-lang="en-US" id="par_id3149741" role="tablehead">Term</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3155577" role="tablehead">Result/Use</paragraph>
+      <paragraph xml-lang="en-US" id="par_id3155577" role="tablehead">Representation/Use</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
@@ -48,96 +53,100 @@
       <paragraph xml-lang="en-US" id="par_id6600543" role="tablecontent">Any character</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id9824518.00000001" role="tablecontent">Represents the given character unless otherwise specified.</paragraph>
+        <paragraph xml-lang="en-US" id="par_id9824518.00000001" role="tablecontent">The given character unless it is a regular expression meta character, which follow in this table.</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-      <paragraph xml-lang="en-US" localize="false" id="par_id3152427" role="tablecontent">.</paragraph>
+      <paragraph localize="false" id="par_id3152427" role="tablecontent">.</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3149031" role="tablecontent">Represents any single character except for a line break or paragraph break. For example, the search term "sh.rt" returns both "shirt" and "short".</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3149031" role="tablecontent">Any single character except a line break or a paragraph break. For example, the search term "sh.rt" matches both "shirt" and "short".</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" localize="false" id="par_id3154682" role="tablecontent">^</paragraph>
+        <paragraph localize="false" id="par_id3154682" role="tablecontent">^</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3155351" role="tablecontent">Only finds the search term if the term is at the beginning of a paragraph. Special objects such as empty fields or character-anchored frames, at the beginning of a paragraph are ignored. Example: "^Peter".</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3155351" role="tablecontent">The beginning of a paragraph or cell. Special objects such as empty fields or character-anchored frames, at the beginning of a paragraph are ignored. Example: "^Peter" matches the word "Peter" only when it is the first word of a paragraph.
+        </paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3159194" localize="false" role="tablecontent">$</paragraph>
+        <paragraph id="par_id3159194" localize="false" role="tablecontent">$</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3152542" role="tablecontent">Only finds the search term if the term appears at the end of a paragraph. Special objects such as empty fields or character-anchored frames at the end of a paragraph are ignored. Example: "Peter$".</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3152542" role="tablecontent">The end of a paragraph or cell. Special objects such as empty fields or character-anchored frames at the end of a paragraph are ignored. Example: "Peter$" matches only when the word "Peter" is the last word of a paragraph, note "Peter" cannot be followed by a period.</paragraph>
       <paragraph xml-lang="en-US" id="par_id3152543" role="tablecontent">$ on its own matches the end of a paragraph. This way it is possible to search and replace paragraph breaks.</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3156414" role="tablecontent" localize="false">*</paragraph>
+        <paragraph id="par_id3156414" role="tablecontent" localize="false">*</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3155555" role="tablecontent">Finds zero or more of the characters in front of the "*". For example, "Ab*c" finds "Ac", "Abc", "Abbc", "Abbbc", and so on.</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3155555" role="tablecontent">Zero or more of the regular expression term immediately preceding it. For example, "Ab*c" matches "Ac", "Abc", "Abbc", "Abbbc", and so on.
+        </paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3147399" localize="false" role="tablecontent">+</paragraph>
+        <paragraph id="par_id3147399" localize="false" role="tablecontent">+</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3157958" role="tablecontent">Finds one or more of the characters in front of the "+". For example, "AX.+4" finds "AXx4", but not "AX4".</paragraph>
-      <paragraph xml-lang="en-US" id="par_id3145313" role="tablecontent">The longest possible string that matches this search pattern in a paragraph is always found. If the paragraph contains the string "AX 4 AX4", the entire passage is highlighted.</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3157958" role="tablecontent">One or more of the regular expression term immediately preceding it. For example, "AX.+4" finds "AXx4", but not "AX4".</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3145313" role="tablecontent">The longest possible string that matches this regular expression in a paragraph is always matched. If the paragraph contains the string "AX 4 AX4", the entire passage is highlighted.</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3143267" localize="false" role="tablecontent">?</paragraph>
+        <paragraph id="par_id3143267" localize="false" role="tablecontent">?</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3153684" role="tablecontent">Finds zero or one of the characters in front of the "?". For example, "Texts?" finds "Text" and "Texts" and "x(ab|c)?y" finds "xy", "xaby", or "xcy".</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3153684" role="tablecontent">Zero or one of the regular expression term immediately preceding it. For example, "Texts?" matches "Text" and "Texts" and "x(ab|c)?y" finds "xy", "xaby", or "xcy".</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3166410" localize="false" role="tablecontent">\</paragraph>
+        <paragraph id="par_id3166410" localize="false" role="tablecontent">\</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3147209" role="tablecontent">Search interprets the special character that follows the "\" as a normal character and not as a regular expression (except for the combinations \n, \t, \>, and \<). For example, "tree\." finds "tree.", not "treed" or "trees".</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3147209" role="tablecontent">The special character that follows it is interpreted as a normal character and not as a regular expression meta character (except for the combinations "\n", "\t", "\b", "\>" and "\<"). For example, "tree\." matches "tree.", not "treed" or "trees".</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3152945" localize="false" role="tablecontent">\n</paragraph>
+        <paragraph id="par_id3152945" localize="false" role="tablecontent">\n</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3153700" role="tablecontent">Represents a line break that was inserted with the <emph>Shift</emph>+<emph>Enter</emph> key combination. To change a line break into a paragraph break, enter <emph>\n</emph> in the <emph>Find</emph> and <emph>Replace</emph> boxes, and then perform a search and replace.</paragraph>
-      <paragraph xml-lang="en-US" id="par_id9262672" role="tablecontent"><emph>\n</emph> in the <emph>Find</emph> text box stands for a line break that was inserted with the <emph>Shift</emph>+<emph>Enter</emph> key combination.</paragraph>
-      <paragraph xml-lang="en-US" id="par_id2366100" role="tablecontent"><emph>\n</emph> in the <emph>Replace</emph> text box stands for a paragraph break that can be entered with the <emph>Enter</emph> or <emph>Return</emph> key.</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3153700" role="tablecontent">A line break that was inserted with the <keycode>Shift+Enter</keycode> key combination when in the <widget>Find</widget> text box. </paragraph>
+        <paragraph role="tablecontent" id="par_id731559575258580">A paragraph break that can be entered with the <keycode>Enter</keycode> or <keycode>Return</keycode> key when in the <widget>Replace</widget> text box.</paragraph>
+        <paragraph role="tablecontent" id="par_id631559575338134">To change line breaks into paragraph breaks, enter \n in both the <widget>Find</widget> and <widget>Replace</widget> boxes, and then perform a search and replace.</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3153258" localize="false" role="tablecontent">\t</paragraph>
+        <paragraph id="par_id3153258" localize="false" role="tablecontent">\t</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3157809" role="tablecontent">Represents a tab. You can also use this expression in the <emph>Replace</emph> box.</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3157809" role="tablecontent">A tab character. Can also be used in the <widget>Replace</widget> box.
+        </paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3150670" localize="false" role="tablecontent">\b</paragraph>
+        <paragraph id="par_id3150670" localize="false" role="tablecontent">\b</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3153666" role="tablecontent">Match a word boundary. For example, "\bbook" finds "bookmark" but not "checkbook" whereas "book\b" finds "checkbook" but not "bookmark". The discrete word "book" is found by both search terms.</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3153666" role="tablecontent">A word boundary. For example, "\bbook" matches "bookmark" and "book" but not "checkbook" whereas "book\b" matches "checkbook" and "book" but not "bookmark".</paragraph>
+        <paragraph role="tablecontent" id="par_id851559575484466">Note, this form replaces the obsolete (although they still work for now) forms "\>" (match end of word) and "\<" (match start of word).</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3149576" localize="false" role="tablecontent">^$</paragraph>
+        <paragraph id="par_id3149576" localize="false" role="tablecontent">^$</paragraph>
     </tablecell>
     <tablecell>
       <paragraph xml-lang="en-US" id="par_id3151245" role="tablecontent">Finds an empty paragraph.</paragraph>
@@ -145,7 +154,7 @@
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3148550" localize="false" role="tablecontent">^.</paragraph>
+        <paragraph id="par_id3148550" localize="false" role="tablecontent">^.</paragraph>
     </tablecell>
     <tablecell>
       <paragraph xml-lang="en-US" id="par_id3159413" role="tablecontent">Finds the first character of a paragraph.</paragraph>
@@ -156,103 +165,94 @@
       <paragraph xml-lang="en-US" id="par_id3147282" role="tablecontent">& or $0</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3153961" role="tablecontent">Adds the string that was found by the search criteria in the <emph>Find</emph> box to the term in the <emph>Replace</emph> box when you make a replacement.</paragraph>
-      <paragraph xml-lang="en-US" id="par_id3149650" role="tablecontent">For example, if you enter "window" in the <emph>Find</emph> box and "&frame" in the <emph>Replace</emph> box, the word "window" is replaced with "windowframe".</paragraph>
-      <paragraph xml-lang="en-US" id="par_id3150543" role="tablecontent">You can also enter an "&" in the <emph>Replace</emph> box to modify the <emph>Attributes</emph> or the <emph>Format</emph> of the string found by the search criteria.</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3153961" role="tablecontent">Adds the string that was found by the search criteria in the <widget>Find</widget> box to the term in the <widget>Replace</widget> box when you make a replacement.</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3149650" role="tablecontent">For example, if you enter "window" in the <widget>Find</widget> box and "&frame" in the <widget>Replace</widget> box, the word "window" is replaced with "windowframe".</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3150543" role="tablecontent">You can also enter an "&" in the <widget>Replace</widget> box to modify the <emph>Attributes</emph> or the <emph>Format</emph> of the string found by the search criteria.</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3145419" localize="false" role="tablecontent">[abc123]</paragraph>
+        <paragraph id="par_id3145419" localize="false" role="tablecontent">[...]</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3154630" role="tablecontent">Represents one of the characters that are between the brackets.</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3154630" role="tablecontent">Any single occurrence of any one of  the characters that are between the brackets. For example: "[abc123]" matches the characters ‘a’, ‘b’,  ’c’, ‘1’, ‘2’ and ‘3’. "[a-e]" matches single occurrences of the characters a through e, inclusive (the range must be specified with the character having the smallest Unicode code number first). "[a-eh-x]" matches any single occurrence of the characters that are in the ranges ‘a’ through ‘e’ and ‘h’ through ‘x’.</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3156293" localize="false" role="tablecontent">[a-e]</paragraph>
+        <paragraph id="par_id3156293" localize="false" role="tablecontent">[^...]</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3149167" role="tablecontent">Represents any of the characters that are between <emph>a</emph> and <emph>e</emph>, including both start and end characters.</paragraph>
-      <paragraph xml-lang="en-US" id="par_id100520090232005" role="tablecontent">The characters are ordered by their code numbers.</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3149167" role="tablecontent">Any single occurrence of a character, including Tab, Space and Line Break characters, that is not in the list of characters specified inclusive ranges are permitted. For example "[^a-syz]" matches all characters not in the inclusive range ‘a’ through ‘s’ or the characters ‘y’ and ‘z’.</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3155994" localize="false" role="tablecontent">[a-eh-x]</paragraph>
+        <paragraph id="par_id3156543" localize="false" role="tablecontent">\uXXXX</paragraph>
+        <paragraph id="par_id3156544" localize="false" role="tablecontent">\UXXXXXXXX</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3148676" role="tablecontent">Represents any of the characters that are between <emph>a-e</emph> and <emph>h-x</emph>.</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3153768" role="tablecontent">The character represented by the four-digit hexadecimal Unicode code (XXXX).</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3153769" role="tablecontent">The character represented by the eight-digit hexadecimal Unicode code (XXXXXXXX).</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3159252" role="tablecontent">For certain symbol fonts the Unicode code for special characters may depend on the font in use. The Unicode codes can be viewed by choosing <menuitem>Insert - Special Character</menuitem>.</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3145318" localize="false" role="tablecontent">[^a-s]</paragraph>
+        <paragraph id="par_id3153951" localize="false" role="tablecontent">|</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3153351" role="tablecontent">Represents everything that is <emph>not</emph> between <emph>a</emph> and <emph>s</emph>.</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3154985" role="tablecontent">The infix operator delimiting alternatives. Matches the term preceding the "|" or the term following the "|". For example, "this|that" matches occurrences of both "this" and "that".</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3156543" localize="false" role="tablecontent">\uXXXX</paragraph>
-        <paragraph xml-lang="en-US" id="par_id3156544" localize="false" role="tablecontent">\UXXXXXXXX</paragraph>
+        <paragraph id="par_id3147376" localize="false" role="tablecontent">{N}</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3153768" role="tablecontent">Represents a character based on its four-digit hexadecimal Unicode code (XXXX).</paragraph>
-      <paragraph xml-lang="en-US" id="par_id3153769" role="tablecontent">For obscure characters there is a separate variant with capital U and eight hexadecimal digits (XXXXXXXX).</paragraph>
-      <paragraph xml-lang="en-US" id="par_id3159252" role="tablecontent">For certain symbol fonts the code for special characters may depend on the used font. You can view the codes by choosing <emph>Insert - Special Character</emph>.</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3150103" role="tablecontent">The post-fix repetition operator that specifies an exact number of occurrences ("N") of the regular expression term immediately preceding it must be present for a match to occur. For example, "tre{2}" matches "tree".</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3153951" localize="false" role="tablecontent">|</paragraph>
+        <paragraph id="par_id3151289" localize="false" role="tablecontent">{N,M}</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3154985" role="tablecontent">Finds the terms that occur before the "|" and also finds the terms that occur after the "|". For example, "this|that" finds "this" and "that".</paragraph>
+        <paragraph xml-lang="en-US" id="par_id3147317" role="tablecontent">The post-fix repetition operator that specifies a range (minimum of "N" to a maximum of "M") of occurrences of the regular expression term immediately preceding it that can be present for a match to occur. For example, "tre{1,2}" marches "tre" and "tree".</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3147376" localize="false" role="tablecontent">{2}</paragraph>
+        <paragraph id="par_id4870754" localize="false" role="tablecontent">{N,}</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3150103" role="tablecontent">Defines the number of times that the character in front of the opening bracket occurs. For example, "tre{2}" finds and selects "tree".</paragraph>
+        <paragraph xml-lang="en-US" id="par_id843836" role="tablecontent">The post-fix repetition operator that specifies a range (minimum "N" to an unspecified maximum) of occurrences of the regular expression term immediately preceding it that can be present for a match to occur. (The maximum number of occurrences is limited only by the size of the document). For example, "tre{2,}" matches "tree", "treee", and "treeeee".</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3151289" localize="false" role="tablecontent">{1,2}</paragraph>
+        <paragraph id="par_id3148616" localize="false" role="tablecontent">(...)</paragraph>
     </tablecell>
     <tablecell>
-      <paragraph xml-lang="en-US" id="par_id3147317" role="tablecontent">Defines the minimum and maximum number of times that the character in front of the opening bracket can occur. For example, "tre{1,2}" finds and selects "tre" and "tree".</paragraph>
+        <paragraph role="paragraph" id="par_id91559576682961">The grouping construct that serves three purposes.</paragraph>
+        <list type="ordered">
+            <listitem>
+                <paragraph id="par_id871559576709007"  role="listitem">To enclose a set of ‘|’ alternatives. For example, the regular expression "b(oo|ac)k" matches both "book" and "back".</paragraph>
+            </listitem>
+            <listitem>
+                <paragraph id="par_id891559576747109"  role="listitem">To group terms in a complex expression to be operated on by the post-fix operators: "*", "+" and "?" along with the post-fix repetition operators. For example, the regular expression "a(bc)?d" matches both "ad" and "abcd" in a search.; the regular expression "M(iss){2}ippi" matches "Mississippi".</paragraph>
+            </listitem>
+            <listitem>
+                <paragraph id="par_id801559576780692"  role="listitem">To record the matched sub string inside the parentheses as a reference for later use in the <widget>Find</widget> box using the "\n" construct or in the <widget>Replace</widget> box using the "$n" construct, where the reference to the first matched sub string in the current expression in the <widget>Find</widget> box is represented by "\1" in the <widget>Find</widget> box and by "$1" in the <widget>Replace</widget> box, the reference to the second matched sub string by "\2" and "$2" respectively, and so on.</paragraph>
+                </listitem>
+        </list>
+        <paragraph role="paragraph" id="par_id951559576846997">For example, the regular expression "(890)7\1\1" matches "8907890890".</paragraph>
+        <paragraph role="paragraph" id="par_id561559576865734">With the regular expression "\b(fruit|truth)\b" in the Find box and the regular expression "$1ful" in the Replace box occurrences of the words "fruit" and "truth" can be replaced with the words "fruitful" and "truthful" respectively without affecting the words "fruitfully" and "truthfully"</paragraph>
     </tablecell>
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id4870754" localize="false" role="tablecontent">{1,}</paragraph>
-    </tablecell>
-    <tablecell>
-      <paragraph xml-lang="en-US" id="par_id843836" role="tablecontent">Defines the minimum number of times that the character in front of the opening bracket can occur. For example, "tre{2,}" finds "tree", "treee", and "treeeee".</paragraph>
-    </tablecell>
-  </tablerow>
-  <tablerow>
-    <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3148616" localize="false" role="tablecontent">( )</paragraph>
-    </tablecell>
-    <tablecell>
-      <paragraph xml-lang="en-US" id="par_id2701803" role="tablecontent">In the <emph>Find</emph> box:</paragraph>
-      <paragraph xml-lang="en-US" id="par_id3153573" role="tablecontent">Defines the characters inside the parentheses as a reference. You can then refer to the first reference in the current expression with "\1", to the second reference with "\2", and so on.</paragraph>
-      <paragraph xml-lang="en-US" id="par_id3156061" role="tablecontent">For example, if your text contains the number <emph>13487889</emph> and you search using the regular expression <emph>(8)7\1\1</emph>, "8788" is found.</paragraph>
-      <paragraph xml-lang="en-US" id="par_id2367931" role="tablecontent">You can also use <emph>()</emph> to group terms, for example, "a(bc)?d" finds "ad" or "abcd".</paragraph>
-      <paragraph xml-lang="en-US" id="par_id9200109" role="tablecontent">In the <emph>Replace</emph> box:<comment>i83322</comment></paragraph>
-      <paragraph xml-lang="en-US" id="par_id5766472" role="tablecontent">Use <emph>$</emph> (dollar) instead of <emph>\</emph> (backslash) to replace references. Use <emph>$0</emph> to replace the whole found string.</paragraph>
-    </tablecell>
-  </tablerow>
-  <tablerow>
-    <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3154790" localize="false" role="tablecontent">[:alpha:]</paragraph>
+        <paragraph id="par_id3154790" localize="false" role="tablecontent">[:alpha:]</paragraph>
     </tablecell>
     <tablecell>
       <paragraph xml-lang="en-US" id="par_id3147397" role="tablecontent">Represents an alphabetic character. Use <emph>[:alpha:]+</emph> to find one of them.</paragraph>
@@ -260,7 +260,7 @@
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3152885" localize="false" role="tablecontent">[:digit:]</paragraph>
+        <paragraph id="par_id3152885" localize="false" role="tablecontent">[:digit:]</paragraph>
     </tablecell>
     <tablecell>
       <paragraph xml-lang="en-US" id="par_id3150010" role="tablecontent">Represents a decimal digit. Use <emph>[:digit:]+</emph> to find one of them.</paragraph>
@@ -268,7 +268,7 @@
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3153743" localize="false" role="tablecontent">[:alnum:]</paragraph>
+        <paragraph id="par_id3153743" localize="false" role="tablecontent">[:alnum:]</paragraph>
     </tablecell>
     <tablecell>
       <paragraph xml-lang="en-US" id="par_id3153281" role="tablecontent">Represents an alphanumeric character ([:alpha:] and [:digit:]).</paragraph>
@@ -276,7 +276,7 @@
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3153726" localize="false" role="tablecontent">[:space:]</paragraph>
+        <paragraph id="par_id3153726" localize="false" role="tablecontent">[:space:]</paragraph>
     </tablecell>
     <tablecell>
       <paragraph xml-lang="en-US" id="par_id3150961" role="tablecontent">Represents a space character (but not other whitespace characters).<comment>UFI: see #i41706#</comment></paragraph>
@@ -284,7 +284,7 @@
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3150486" localize="false" role="tablecontent">[:print:]</paragraph>
+        <paragraph id="par_id3150486" localize="false" role="tablecontent">[:print:]</paragraph>
     </tablecell>
     <tablecell>
       <paragraph xml-lang="en-US" id="par_id3150872" role="tablecontent">Represents a printable character.</paragraph>
@@ -292,7 +292,7 @@
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3155854" localize="false" role="tablecontent">[:cntrl:]</paragraph>
+        <paragraph id="par_id3155854" localize="false" role="tablecontent">[:cntrl:]</paragraph>
     </tablecell>
     <tablecell>
       <paragraph xml-lang="en-US" id="par_id3152576" role="tablecontent">Represents a nonprinting character.</paragraph>
@@ -300,7 +300,7 @@
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3149958" localize="false" role="tablecontent">[:lower:]</paragraph>
+        <paragraph id="par_id3149958" localize="false" role="tablecontent">[:lower:]</paragraph>
     </tablecell>
     <tablecell>
       <paragraph xml-lang="en-US" id="par_id3145730" role="tablecontent">Represents a lowercase character if <emph>Match case</emph> is selected in <emph>Options</emph>.</paragraph>
@@ -308,7 +308,7 @@
   </tablerow>
   <tablerow>
     <tablecell>
-        <paragraph xml-lang="en-US" id="par_id3148455" localize="false" role="tablecontent">[:upper:]</paragraph>
+        <paragraph id="par_id3148455" localize="false" role="tablecontent">[:upper:]</paragraph>
     </tablecell>
     <tablecell>
       <paragraph xml-lang="en-US" id="par_id3150092" role="tablecontent">Represents an uppercase character if <emph>Match case</emph> is selected in <emph>Options</emph>.</paragraph>
@@ -316,16 +316,93 @@
   </tablerow>
 </table>
 <paragraph xml-lang="en-US" id="par_id5311440" role="paragraph">For a full list of supported metacharacters and syntax, see <link href="http://userguide.icu-project.org/strings/regexp" name="ICU Regular Expressions documentation">ICU Regular Expressions documentation</link></paragraph>
-<paragraph xml-lang="en-US" id="hd_id5311441" role="heading" level="2">Examples</paragraph>
-<paragraph xml-lang="en-US" id="par_id956834773" role="paragraph"><item type="input">e([:digit:])?</item>     -- finds 'e' followed by zero or one digit. Note that currently all named character classes like [:digit:] must be enclosed in parentheses.<comment>issue 64368 and 113035</comment></paragraph>
-<paragraph xml-lang="en-US" id="par_id952368773" role="paragraph"><item type="input">^([:digit:])$</item>     -- finds lines or cells with exactly one digit.</paragraph>
-  <paragraph xml-lang="en-US" id="par_id9568773" role="paragraph">You can combine the search terms to form complex searches.</paragraph>
-<paragraph xml-lang="en-US" id="hd_id71413" role="heading" level="3">To find three-digit numbers alone in a paragraph</paragraph>
-<paragraph xml-lang="en-US" id="par_id2924283" localize="false" role="paragraph"><item type="input">^[:digit:]{3}$</item> </paragraph>
-  <paragraph xml-lang="en-US" id="par_id5781731" role="paragraph">^ means the match has to be at the start of a paragraph, </paragraph>
-  <paragraph xml-lang="en-US" id="par_id6942045" role="paragraph">[:digit:] matches any decimal digit, </paragraph>
-  <paragraph xml-lang="en-US" id="par_id4721823" role="paragraph">{3} means there must be exactly 3 copies of "digit", </paragraph>
-  <paragraph xml-lang="en-US" id="par_id5806756" role="paragraph">$ means the match must end a paragraph. </paragraph>
+<paragraph role="paragraph" id="par_id141559577104334">Note that currently all named character class terms, [:alpha:] through [:upper:], must be enclosed in parentheses when used in a regular expression, see the examples that follow.</paragraph>
+<paragraph role="paragraph" id="par_id261559577375317">Regular expression terms can be combined to form complex and sophisticated regular expressions for searches as show in the following examples.</paragraph>
+<h2 id="hd_id5311441">Examples</h2>
+
+<table id="tab_id831559577400291">
+    <tablerow>
+        <tablecell>
+            <paragraph id="par_id901559577400292" role="tablehead">Expression</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id381559577400292" role="tablehead">Meaning</paragraph>
+        </tablecell>
+    </tablerow>
+    <tablerow>
+        <tablecell>
+            <paragraph id="par_id641559577400292" role="tablecontent" localize="false">^$</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id621559577542068"  role="tablecontent">An empty paragraph.</paragraph>
+            <paragraph id="par_id311559577563701"  role="tablecontent"><variable id="startpar">^ specifies that the match must be at the start of a paragraph,</variable></paragraph>
+            <paragraph id="par_id391559577592658"  role="tablecontent"><variable id="endpar">$ specifies that a paragraph mark or the end of a cell must follow the matched string.</variable></paragraph>
+        </tablecell>
+    </tablerow>
+    <tablerow>
+        <tablecell>
+            <paragraph id="par_id251559577837101" role="tablecontent" localize="false">^.</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id771559577837101" role="tablecontent">The first character of a paragraph.</paragraph>
+            <paragraph role="tablecontent" id="par_id871559577915900" localize="false"><embedvar href="text/shared/01/02100001.xhp#startpar" markup="ignore"/> </paragraph>
+            <paragraph role="tablecontent" id="par_id171559577924884">. specifies any single character.</paragraph>
+        </tablecell>
+    </tablerow>
+    <tablerow>
+        <tablecell>
+            <paragraph id="par_id721559577961403" role="tablecontent" localize="false">e([:digit:])?</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id471559577961403" role="tablecontent">Matches "e" by itself or an "e" followed by one digit.</paragraph>
+            <paragraph role="tablecontent" id="par_id421559578050163">e specifies the character "e",</paragraph>
+            <paragraph role="tablecontent" id="par_id591559578054502"><variable id="digit">[:digit:] specifies any decimal digit,</variable></paragraph>
+            <paragraph role="tablecontent" id="par_id341559578058972">? specifies zero or one occurrences of [:digit:].</paragraph>
+        </tablecell>
+    </tablerow>
+    <tablerow>
+        <tablecell>
+            <paragraph id="par_id191559578087559" role="tablecontent" localize="false">^([:digit:])$</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id551559578087559" role="tablecontent" >Matches a paragraph or cells containing exactly one digit.</paragraph>
+            <paragraph role="tablecontent" id="par_id721559578137006" localize="false"><embedvar href="text/shared/01/02100001.xhp#startpar" markup="ignore"/></paragraph>
+            <paragraph role="tablecontent" id="par_id941559578151564" localize="false"><embedvar href="text/shared/01/02100001.xhp#digit" markup="ignore"/></paragraph>
+            <paragraph role="tablecontent" id="par_id791559578157006" localize="false"><embedvar href="text/shared/01/02100001.xhp#endpar" markup="ignore"/></paragraph>
+        </tablecell>
+    </tablerow>
+    <tablerow>
+        <tablecell>
+            <paragraph id="par_id651559578184372" role="tablecontent" localize="false">^[:digit:]{3}$</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id771559578184372" role="tablecontent">Matches a paragraph or cell containing only three digit numbers</paragraph>
+            <paragraph role="tablecontent" id="par_id631559578489930" localize="false"><embedvar href="text/shared/01/02100001.xhp#startpar" markup="ignore"/></paragraph>
+            <paragraph role="tablecontent" id="par_id551559578496775" localize="false"><embedvar href="text/shared/01/02100001.xhp#digit"/></paragraph>
+            <paragraph role="tablecontent" id="par_id401559578501329">{3} specifies that [:digit:] must occur three times,</paragraph>
+            <paragraph role="tablecontent" id="par_id251559578508215" localize="false"><embedvar href="text/shared/01/02100001.xhp#endpar" markup="ignore"/></paragraph>
+        </tablecell>
+    </tablerow>
+    <tablerow>
+        <tablecell>
+            <paragraph id="par_id131559578728924" role="tablecontent" localize="false">\bconst(itu|ruc)tion\b</paragraph>
+        </tablecell>
+        <tablecell>
+            <paragraph id="par_id891559578728925" role="tablecontent">Matches the words "constitution" and "construction" but not the word "constitutional."</paragraph>
+            <paragraph role="tablecontent" id="par_id381559578787403">\b specifies that the match must begin at a word boundary,</paragraph>
+            <paragraph role="tablecontent" id="par_id721559578792194">const specifies the characters "const",</paragraph>
+            <paragraph role="tablecontent" id="par_id941559578797721">( starts the group,</paragraph>
+            <paragraph role="tablecontent" id="par_id641559578802269">itu specifies the characters "itu",</paragraph>
+            <paragraph role="tablecontent" id="par_id271559578807054">| specifies the alternative,</paragraph>
+            <paragraph role="tablecontent" id="par_id801559578813944">ruc specifies the characters "ruc",</paragraph>
+            <paragraph role="tablecontent" id="par_id421559578820595">) ends the group,</paragraph>
+            <paragraph role="tablecontent" id="par_id621559578825464">tion specifies the characters "tion",</paragraph>
+            <paragraph role="tablecontent" id="par_id91559578832058">/b specifies that the match must end at a word boundary.</paragraph>
+        </tablecell>
+    </tablerow>
+</table>
+
+
 <section id="relatedtopics">
   <embed href="text/shared/01/02100000.xhp#02100000"/>
 <switch select="appl">


More information about the Libreoffice-commits mailing list