1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?> 2cdf0e10cSrcweir<helpdocument version="1.0"> 3cdf0e10cSrcweir 4ce44d6c1SAndrew Rist<!--*********************************************************** 5cdf0e10cSrcweir * 6ce44d6c1SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 7ce44d6c1SAndrew Rist * or more contributor license agreements. See the NOTICE file 8ce44d6c1SAndrew Rist * distributed with this work for additional information 9ce44d6c1SAndrew Rist * regarding copyright ownership. The ASF licenses this file 10ce44d6c1SAndrew Rist * to you under the Apache License, Version 2.0 (the 11ce44d6c1SAndrew Rist * "License"); you may not use this file except in compliance 12ce44d6c1SAndrew Rist * with the License. You may obtain a copy of the License at 13cdf0e10cSrcweir * 14ce44d6c1SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 15cdf0e10cSrcweir * 16ce44d6c1SAndrew Rist * Unless required by applicable law or agreed to in writing, 17ce44d6c1SAndrew Rist * software distributed under the License is distributed on an 18ce44d6c1SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 19ce44d6c1SAndrew Rist * KIND, either express or implied. See the License for the 20ce44d6c1SAndrew Rist * specific language governing permissions and limitations 21ce44d6c1SAndrew Rist * under the License. 22cdf0e10cSrcweir * 23ce44d6c1SAndrew Rist ***********************************************************--> 24ce44d6c1SAndrew Rist 25ce44d6c1SAndrew Rist 26cdf0e10cSrcweir 27cdf0e10cSrcweir 28cdf0e10cSrcweir<meta> 29cdf0e10cSrcweir <topic id="textshared0102100001xml" indexer="include" status="PUBLISH"> 30cdf0e10cSrcweir <title xml-lang="en-US" id="tit">List of Regular Expressions</title> 31cdf0e10cSrcweir <filename>/text/shared/01/02100001.xhp</filename> 32cdf0e10cSrcweir </topic> 33cdf0e10cSrcweir </meta> 34cdf0e10cSrcweir <body> 35cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="index" id="bm_id3146765"><bookmark_value>regular expressions; list of</bookmark_value> 36cdf0e10cSrcweir <bookmark_value>lists;regular expressions</bookmark_value> 37cdf0e10cSrcweir <bookmark_value>replacing;tab stops (regular expressions)</bookmark_value> 38cdf0e10cSrcweir <bookmark_value>tab stops;regular expressions</bookmark_value> 39cdf0e10cSrcweir <bookmark_value>concatenation, see ampersand symbol</bookmark_value> 40cdf0e10cSrcweir <bookmark_value>ampersand symbol, see also operators</bookmark_value> 41cdf0e10cSrcweir</bookmark><comment>mw added "replacing;" and "tab stops;"</comment> 42cdf0e10cSrcweir<paragraph xml-lang="en-US" id="hd_id3146765" role="heading" level="1" l10n="U" 43cdf0e10cSrcweir oldref="203"><variable id="02100001"><link href="text/shared/01/02100001.xhp">List of Regular Expressions</link> 44cdf0e10cSrcweir</variable></paragraph> 45cdf0e10cSrcweir <table id="tbl_id3149517"> 46cdf0e10cSrcweir <tablerow> 47cdf0e10cSrcweir <tablecell> 48cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3149741" role="tablehead" l10n="U" oldref="17">Character</paragraph> 49cdf0e10cSrcweir </tablecell> 50cdf0e10cSrcweir <tablecell> 51cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3155577" role="tablehead" l10n="U" oldref="18">Result/Use</paragraph> 52cdf0e10cSrcweir </tablecell> 53cdf0e10cSrcweir </tablerow> 54cdf0e10cSrcweir <tablerow> 55cdf0e10cSrcweir <tablecell> 56cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id6600543" role="tablecontent" l10n="NEW">Any character</paragraph> 57cdf0e10cSrcweir </tablecell> 58cdf0e10cSrcweir <tablecell> 59cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id9824518.00000001" role="tablecontent" l10n="CHG">Represents the given character unless otherwise specified.</paragraph> 60cdf0e10cSrcweir </tablecell> 61cdf0e10cSrcweir </tablerow> 62cdf0e10cSrcweir <tablerow> 63cdf0e10cSrcweir <tablecell> 64cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3152427" role="tablecontent" l10n="U" oldref="19">.</paragraph> 65cdf0e10cSrcweir </tablecell> 66cdf0e10cSrcweir <tablecell> 67cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3149031" role="tablecontent" l10n="CHG" oldref="20">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> 68cdf0e10cSrcweir </tablecell> 69cdf0e10cSrcweir </tablerow> 70cdf0e10cSrcweir <tablerow> 71cdf0e10cSrcweir <tablecell> 72cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3154682" role="tablecontent" l10n="CHG" oldref="21">^</paragraph> 73cdf0e10cSrcweir </tablecell> 74cdf0e10cSrcweir <tablecell> 75cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3155351" role="tablecontent" l10n="CHG" oldref="22">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> 76cdf0e10cSrcweir </tablecell> 77cdf0e10cSrcweir </tablerow> 78cdf0e10cSrcweir <tablerow> 79cdf0e10cSrcweir <tablecell> 80cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3159194" role="tablecontent" l10n="CHG" oldref="23">$</paragraph> 81cdf0e10cSrcweir </tablecell> 82cdf0e10cSrcweir <tablecell> 83cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3152542" role="tablecontent" l10n="CHG" oldref="24">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> 84cdf0e10cSrcweir </tablecell> 85cdf0e10cSrcweir </tablerow> 86cdf0e10cSrcweir <tablerow> 87cdf0e10cSrcweir <tablecell> 88cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3156414" role="tablecontent" l10n="U" oldref="25">*</paragraph> 89cdf0e10cSrcweir </tablecell> 90cdf0e10cSrcweir <tablecell> 91cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3155555" role="tablecontent" l10n="CHG" oldref="26">Finds zero or more of the characters in front of the "*". For example, "Ab*c" finds "Ac", "Abc", "Abbc", "Abbbc", and so on.</paragraph> 92cdf0e10cSrcweir </tablecell> 93cdf0e10cSrcweir </tablerow> 94cdf0e10cSrcweir <tablerow> 95cdf0e10cSrcweir <tablecell> 96cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3147399" role="tablecontent" l10n="U" oldref="27">+</paragraph> 97cdf0e10cSrcweir </tablecell> 98cdf0e10cSrcweir <tablecell> 99cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3157958" role="tablecontent" l10n="CHG" oldref="28">Finds one or more of the characters in front of the "+". For example, "AX.+4" finds "AXx4", but not "AX4".</paragraph> 100cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3145313" role="tablecontent" l10n="U" oldref="207">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> 101cdf0e10cSrcweir </tablecell> 102cdf0e10cSrcweir </tablerow> 103cdf0e10cSrcweir <tablerow> 104cdf0e10cSrcweir <tablecell> 105cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3143267" role="tablecontent" l10n="U" oldref="199">?</paragraph> 106cdf0e10cSrcweir </tablecell> 107cdf0e10cSrcweir <tablecell> 108cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153684" role="tablecontent" l10n="CHG" oldref="200">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> 109cdf0e10cSrcweir </tablecell> 110cdf0e10cSrcweir </tablerow> 111cdf0e10cSrcweir <tablerow> 112cdf0e10cSrcweir <tablecell> 113cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3166410" role="tablecontent" l10n="U" oldref="158">\</paragraph> 114cdf0e10cSrcweir </tablecell> 115cdf0e10cSrcweir <tablecell> 116cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3147209" role="tablecontent" l10n="CHG" oldref="159">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> 117cdf0e10cSrcweir </tablecell> 118cdf0e10cSrcweir </tablerow> 119cdf0e10cSrcweir <tablerow> 120cdf0e10cSrcweir <tablecell> 121cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3152945" role="tablecontent" l10n="U" oldref="166">\n</paragraph> 122cdf0e10cSrcweir </tablecell> 123cdf0e10cSrcweir <tablecell> 124cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153700" role="tablecontent" l10n="CHG" oldref="167">Represents a line break that was inserted with the Shift+Enter key combination. To change a line break into a paragraph break, enter <emph>\n</emph> in the <emph>Search for</emph> and <emph>Replace with</emph> boxes, and then perform a search and replace.</paragraph> 125cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id9262672" role="tablecontent" l10n="NEW">\n in the <emph>Search for</emph> text box stands for a line break that was inserted with the Shift+Enter key combination.</paragraph> 126cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id2366100" role="tablecontent" l10n="NEW">\n in the <emph>Replace with</emph> text box stands for a paragraph break that can be entered with the Enter or Return key.</paragraph> 127cdf0e10cSrcweir </tablecell> 128cdf0e10cSrcweir </tablerow> 129cdf0e10cSrcweir <tablerow> 130cdf0e10cSrcweir <tablecell> 131cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153258" role="tablecontent" l10n="U" oldref="29">\t</paragraph> 132cdf0e10cSrcweir </tablecell> 133cdf0e10cSrcweir <tablecell> 134cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3157809" role="tablecontent" l10n="CHG" oldref="30">Represents a tab. You can also use this expression in the <emph>Replace with</emph> box.</paragraph> 135cdf0e10cSrcweir </tablecell> 136cdf0e10cSrcweir </tablerow> 137cdf0e10cSrcweir <tablerow> 138cdf0e10cSrcweir <tablecell> 13908d2dd9aSHerbert Dürr <paragraph xml-lang="en-US" id="par_id3150670" role="tablecontent" l10n="U" oldref="35">\b</paragraph> 140cdf0e10cSrcweir </tablecell> 141cdf0e10cSrcweir <tablecell> 142567fbc9aSHerbert Dürr <paragraph xml-lang="en-US" id="par_id3153666" role="tablecontent" l10n="CHG" oldref="36">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> 143cdf0e10cSrcweir </tablecell> 144cdf0e10cSrcweir </tablerow> 145cdf0e10cSrcweir <tablerow> 146cdf0e10cSrcweir <tablecell> 147cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3149576" role="tablecontent" l10n="U" oldref="37">^$</paragraph> 148cdf0e10cSrcweir </tablecell> 149cdf0e10cSrcweir <tablecell> 150cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3151245" role="tablecontent" l10n="CHG" oldref="38">Finds an empty paragraph.</paragraph> 151cdf0e10cSrcweir </tablecell> 152cdf0e10cSrcweir </tablerow> 153cdf0e10cSrcweir <tablerow> 154cdf0e10cSrcweir <tablecell> 155cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3148550" role="tablecontent" l10n="U" oldref="41">^.</paragraph> 156cdf0e10cSrcweir </tablecell> 157cdf0e10cSrcweir <tablecell> 158cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3159413" role="tablecontent" l10n="CHG" oldref="42">Finds the first character of a paragraph.</paragraph> 159cdf0e10cSrcweir </tablecell> 160cdf0e10cSrcweir </tablerow> 161cdf0e10cSrcweir <tablerow> 162cdf0e10cSrcweir <tablecell> 163cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3147282" role="tablecontent" l10n="CHG" oldref="43">& or $0</paragraph> 164cdf0e10cSrcweir </tablecell> 165cdf0e10cSrcweir <tablecell> 166cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153961" role="tablecontent" l10n="CHG" oldref="44">Adds the string that was found by the search criteria in the <emph>Search for</emph> box to the term in the <emph>Replace with</emph> box when you make a replacement.</paragraph> 167cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3149650" role="tablecontent" l10n="CHG" oldref="201">For example, if you enter "window" in the <emph>Search for</emph> box and "&frame" in the <emph>Replace with</emph> box, the word "window" is replaced with "windowframe".</paragraph> 168cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3150543" role="tablecontent" l10n="CHG" oldref="206">You can also enter an "&" in the <emph>Replace with</emph> box to modify the <emph>Attributes</emph> or the <emph>Format</emph> of the string found by the search criteria.</paragraph> 169cdf0e10cSrcweir </tablecell> 170cdf0e10cSrcweir </tablerow> 171cdf0e10cSrcweir <tablerow> 172cdf0e10cSrcweir <tablecell> 173cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3145419" role="tablecontent" l10n="U" oldref="172">[abc123]</paragraph> 174cdf0e10cSrcweir </tablecell> 175cdf0e10cSrcweir <tablecell> 176cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3154630" role="tablecontent" l10n="CHG" oldref="173">Represents one of the characters that are between the brackets.</paragraph> 177cdf0e10cSrcweir </tablecell> 178cdf0e10cSrcweir </tablerow> 179cdf0e10cSrcweir <tablerow> 180cdf0e10cSrcweir <tablecell> 181cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3156293" role="tablecontent" l10n="U" oldref="174">[a-e]</paragraph> 182cdf0e10cSrcweir </tablecell> 183cdf0e10cSrcweir <tablecell> 184cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3149167" role="tablecontent" l10n="CHG" oldref="175">Represents any of the characters that are between a and e, including both start and end characters</paragraph> 185cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id100520090232005" role="tablecontent" l10n="NEW">The characters are ordered by their code numbers.</paragraph> 186cdf0e10cSrcweir </tablecell> 187cdf0e10cSrcweir </tablerow> 188cdf0e10cSrcweir <tablerow> 189cdf0e10cSrcweir <tablecell> 190cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3155994" role="tablecontent" l10n="U" oldref="176">[a-eh-x]</paragraph> 191cdf0e10cSrcweir </tablecell> 192cdf0e10cSrcweir <tablecell> 193cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3148676" role="tablecontent" l10n="CHG" oldref="177">Represents any of the characters that are between a-e and h-x.</paragraph> 194cdf0e10cSrcweir </tablecell> 195cdf0e10cSrcweir </tablerow> 196cdf0e10cSrcweir <tablerow> 197cdf0e10cSrcweir <tablecell> 198cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3145318" role="tablecontent" l10n="U" oldref="178">[^a-s]</paragraph> 199cdf0e10cSrcweir </tablecell> 200cdf0e10cSrcweir <tablecell> 201cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153351" role="tablecontent" l10n="CHG" oldref="179">Represents everything that is not between a and s.</paragraph> 202cdf0e10cSrcweir </tablecell> 203cdf0e10cSrcweir </tablerow> 204cdf0e10cSrcweir <tablerow> 205cdf0e10cSrcweir <tablecell> 206cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3156543" role="tablecontent" l10n="U" oldref="180">\xXXXX</paragraph> 207cdf0e10cSrcweir </tablecell> 208cdf0e10cSrcweir <tablecell> 209cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153768" role="tablecontent" l10n="U" oldref="181">Represents a special character based on its four-digit hexadecimal code (XXXX).</paragraph> 210cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3159252" role="tablecontent" l10n="U" oldref="208">The code for the special character depends on the font used. You can view the codes by choosing <emph>Insert - Special Character</emph>.</paragraph> 211cdf0e10cSrcweir </tablecell> 212cdf0e10cSrcweir </tablerow> 213cdf0e10cSrcweir <tablerow> 214cdf0e10cSrcweir <tablecell> 215cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153951" role="tablecontent" l10n="U" oldref="186">|</paragraph> 216cdf0e10cSrcweir </tablecell> 217cdf0e10cSrcweir <tablecell> 218cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3154985" role="tablecontent" l10n="CHG" oldref="187">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> 219cdf0e10cSrcweir </tablecell> 220cdf0e10cSrcweir </tablerow> 221cdf0e10cSrcweir <tablerow> 222cdf0e10cSrcweir <tablecell> 223cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3147376" role="tablecontent" l10n="U" oldref="209">{2}</paragraph> 224cdf0e10cSrcweir </tablecell> 225cdf0e10cSrcweir <tablecell> 226cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3150103" role="tablecontent" l10n="U" oldref="210">Defines the number of times that the character in front of the opening bracket occurs. For example, "tre{2}" finds and selects "tree".</paragraph> 227cdf0e10cSrcweir </tablecell> 228cdf0e10cSrcweir </tablerow> 229cdf0e10cSrcweir <tablerow> 230cdf0e10cSrcweir <tablecell> 231cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3151289" role="tablecontent" l10n="U" oldref="211">{1,2}</paragraph> 232cdf0e10cSrcweir </tablecell> 233cdf0e10cSrcweir <tablecell> 234cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3147317" role="tablecontent" l10n="CHG" oldref="212">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> 235cdf0e10cSrcweir </tablecell> 236cdf0e10cSrcweir </tablerow> 237cdf0e10cSrcweir <tablerow> 238cdf0e10cSrcweir <tablecell> 239cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id4870754" role="tablecontent" l10n="NEW">{1,}</paragraph> 240cdf0e10cSrcweir </tablecell> 241cdf0e10cSrcweir <tablecell> 242cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id843836" role="tablecontent" l10n="NEW">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> 243cdf0e10cSrcweir </tablecell> 244cdf0e10cSrcweir </tablerow> 245cdf0e10cSrcweir <tablerow> 246cdf0e10cSrcweir <tablecell> 247cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3148616" role="tablecontent" l10n="U" oldref="213">( )</paragraph> 248cdf0e10cSrcweir </tablecell> 249cdf0e10cSrcweir <tablecell> 250cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id2701803" role="tablecontent" l10n="NEW">In the <emph>Search for</emph> box:</paragraph> 251cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153573" role="tablecontent" l10n="CHG" oldref="214">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> 252cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3156061" role="tablecontent" l10n="U" oldref="215">For example, if your text contains the number 13487889 and you search using the regular expression (8)7\1\1, "8788" is found.</paragraph> 253cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id2367931" role="tablecontent" l10n="NEW">You can also use () to group terms, for example, "a(bc)?d" finds "ad" or "abcd".</paragraph> 254cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id9200109" role="tablecontent" l10n="NEW">In the <emph>Replace with</emph> box:<comment>i83322</comment></paragraph> 255cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id5766472" role="tablecontent" l10n="NEW">Use $ (dollar) instead of \ (backslash) to replace references. Use $0 to replace the whole found string.</paragraph> 256cdf0e10cSrcweir </tablecell> 257cdf0e10cSrcweir </tablerow> 258cdf0e10cSrcweir <tablerow> 259cdf0e10cSrcweir <tablecell> 260cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3154790" role="tablecontent" l10n="U" oldref="226">[:alpha:]</paragraph> 261cdf0e10cSrcweir </tablecell> 262cdf0e10cSrcweir <tablecell> 263*e8e3a5d8SAndrea Pescetti <paragraph xml-lang="en-US" id="par_id3147397" role="tablecontent" l10n="CHG" oldref="227">Represents an alphabetic character. Use [:alpha:]+ to find one or more of them.</paragraph> 264cdf0e10cSrcweir </tablecell> 265cdf0e10cSrcweir </tablerow> 266cdf0e10cSrcweir <tablerow> 267cdf0e10cSrcweir <tablecell> 268cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3152885" role="tablecontent" l10n="U" oldref="216">[:digit:]</paragraph> 269cdf0e10cSrcweir </tablecell> 270cdf0e10cSrcweir <tablecell> 271*e8e3a5d8SAndrea Pescetti <paragraph xml-lang="en-US" id="par_id3150010" role="tablecontent" l10n="CHG" oldref="217">Represents a decimal digit. Use [:digit:]+ to find one or more of them.</paragraph> 272cdf0e10cSrcweir </tablecell> 273cdf0e10cSrcweir </tablerow> 274cdf0e10cSrcweir <tablerow> 275cdf0e10cSrcweir <tablecell> 276cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153743" role="tablecontent" l10n="U" oldref="224">[:alnum:]</paragraph> 277cdf0e10cSrcweir </tablecell> 278cdf0e10cSrcweir <tablecell> 279cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153281" role="tablecontent" l10n="CHG" oldref="225">Represents an alphanumeric character ([:alpha:] and [:digit:]).</paragraph> 280cdf0e10cSrcweir </tablecell> 281cdf0e10cSrcweir </tablerow> 282cdf0e10cSrcweir <tablerow> 283cdf0e10cSrcweir <tablecell> 284cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153726" role="tablecontent" l10n="U" oldref="218">[:space:]</paragraph> 285cdf0e10cSrcweir </tablecell> 286cdf0e10cSrcweir <tablecell> 287cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3150961" role="tablecontent" l10n="CHG" oldref="219">Represents a space character (but not other whitespace characters).<comment>UFI: see #i41706#</comment></paragraph> 288cdf0e10cSrcweir </tablecell> 289cdf0e10cSrcweir </tablerow> 290cdf0e10cSrcweir <tablerow> 291cdf0e10cSrcweir <tablecell> 292cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3150486" role="tablecontent" l10n="U" oldref="220">[:print:]</paragraph> 293cdf0e10cSrcweir </tablecell> 294cdf0e10cSrcweir <tablecell> 295cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3150872" role="tablecontent" l10n="CHG" oldref="221">Represents a printable character.</paragraph> 296cdf0e10cSrcweir </tablecell> 297cdf0e10cSrcweir </tablerow> 298cdf0e10cSrcweir <tablerow> 299cdf0e10cSrcweir <tablecell> 300cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3155854" role="tablecontent" l10n="U" oldref="222">[:cntrl:]</paragraph> 301cdf0e10cSrcweir </tablecell> 302cdf0e10cSrcweir <tablecell> 303cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3152576" role="tablecontent" l10n="CHG" oldref="223">Represents a nonprinting character.</paragraph> 304cdf0e10cSrcweir </tablecell> 305cdf0e10cSrcweir </tablerow> 306cdf0e10cSrcweir <tablerow> 307cdf0e10cSrcweir <tablecell> 308cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3149958" role="tablecontent" l10n="U" oldref="228">[:lower:]</paragraph> 309cdf0e10cSrcweir </tablecell> 310cdf0e10cSrcweir <tablecell> 311cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3145730" role="tablecontent" l10n="CHG" oldref="229">Represents a lowercase character if <emph>Match case</emph> is selected in <emph>Options</emph>.</paragraph> 312cdf0e10cSrcweir </tablecell> 313cdf0e10cSrcweir </tablerow> 314cdf0e10cSrcweir <tablerow> 315cdf0e10cSrcweir <tablecell> 316cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3148455" role="tablecontent" l10n="U" oldref="230">[:upper:]</paragraph> 317cdf0e10cSrcweir </tablecell> 318cdf0e10cSrcweir <tablecell> 319cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3150092" role="tablecontent" l10n="CHG" oldref="231">Represents an uppercase character if <emph>Match case</emph> is selected in <emph>Options.</emph> 320cdf0e10cSrcweir </paragraph> 321cdf0e10cSrcweir </tablecell> 322cdf0e10cSrcweir </tablerow> 323cdf0e10cSrcweir </table> 324cdf0e10cSrcweir 325cdf0e10cSrcweir <paragraph xml-lang="en-US" id="hd_id5311441" role="heading" level="2" l10n="NEW">Examples</paragraph> 326cdf0e10cSrcweir 327cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id956834773" role="paragraph" l10n="NEW">e([:digit:])? -- 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> 328cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id952368773" role="paragraph" l10n="NEW">^([:digit:])$ -- finds lines or cells with exactly one digit.</paragraph> 329cdf0e10cSrcweir 330cdf0e10cSrcweir 331cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id9568773" role="paragraph" l10n="NEW">You can combine the search terms to form complex searches.</paragraph> 332cdf0e10cSrcweir <paragraph xml-lang="en-US" id="hd_id71413" role="heading" level="3" l10n="NEW">To find three-digit numbers alone in a paragraph</paragraph> 333cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id2924283" role="code" l10n="NEW">^[:digit:]{3}$</paragraph> 334cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id5781731" role="paragraph" l10n="NEW">^ means the match has to be at the start of a paragraph, </paragraph> 335cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id6942045" role="paragraph" l10n="NEW">[:digit:] matches any decimal digit, </paragraph> 336cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id4721823" role="paragraph" l10n="NEW">{3} means there must be exactly 3 copies of "digit", </paragraph> 337cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id5806756" role="paragraph" l10n="NEW">$ means the match must end a paragraph. </paragraph> 338cdf0e10cSrcweir <section id="relatedtopics"> 339cdf0e10cSrcweir <embed href="text/shared/01/02100000.xhp#02100000"/> 340cdf0e10cSrcweir<switch select="appl"> 341cdf0e10cSrcweir<case select="WRITER"><embed href="text/swriter/guide/search_regexp.xhp#search_regexp"/> 342cdf0e10cSrcweir <embed href="text/swriter/guide/finding.xhp#finding"/> 343cdf0e10cSrcweir</case> 344cdf0e10cSrcweir</switch> 3456f9008d8SAriel Constenla-Haile<paragraph xml-lang="en-US" id="par_id1751457" role="paragraph" l10n="NEW"><link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Regular_Expressions_in_Writer">Wiki page about regular expressions in Writer</link></paragraph> 3466f9008d8SAriel Constenla-Haile <paragraph xml-lang="en-US" id="par_id5483870" role="paragraph" l10n="NEW"><link href="https://wiki.openoffice.org/wiki/Documentation/How_Tos/Regular_Expressions_in_Calc">Wiki page about regular expressions in Calc</link></paragraph> 347cdf0e10cSrcweir </section> 348cdf0e10cSrcweir </body> 349cdf0e10cSrcweir</helpdocument> 350