1*cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?> 2*cdf0e10cSrcweir<helpdocument version="1.0"> 3*cdf0e10cSrcweir 4*cdf0e10cSrcweir<!-- 5*cdf0e10cSrcweir*********************************************************************** 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 12*cdf0e10cSrcweir * 13*cdf0e10cSrcweir * This file is part of OpenOffice.org. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 16*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 17*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 18*cdf0e10cSrcweir * 19*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 20*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 21*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 23*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 24*cdf0e10cSrcweir * 25*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 26*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 27*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 28*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 29*cdf0e10cSrcweir * 30*cdf0e10cSrcweir ************************************************************************ 31*cdf0e10cSrcweir --> 32*cdf0e10cSrcweir 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir<meta> 35*cdf0e10cSrcweir <topic id="textshared0102100001xml" indexer="include" status="PUBLISH"> 36*cdf0e10cSrcweir <title xml-lang="en-US" id="tit">List of Regular Expressions</title> 37*cdf0e10cSrcweir <filename>/text/shared/01/02100001.xhp</filename> 38*cdf0e10cSrcweir </topic> 39*cdf0e10cSrcweir </meta> 40*cdf0e10cSrcweir <body> 41*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="index" id="bm_id3146765"><bookmark_value>regular expressions; list of</bookmark_value> 42*cdf0e10cSrcweir <bookmark_value>lists;regular expressions</bookmark_value> 43*cdf0e10cSrcweir <bookmark_value>replacing;tab stops (regular expressions)</bookmark_value> 44*cdf0e10cSrcweir <bookmark_value>tab stops;regular expressions</bookmark_value> 45*cdf0e10cSrcweir <bookmark_value>concatenation, see ampersand symbol</bookmark_value> 46*cdf0e10cSrcweir <bookmark_value>ampersand symbol, see also operators</bookmark_value> 47*cdf0e10cSrcweir</bookmark><comment>mw added "replacing;" and "tab stops;"</comment> 48*cdf0e10cSrcweir<paragraph xml-lang="en-US" id="hd_id3146765" role="heading" level="1" l10n="U" 49*cdf0e10cSrcweir oldref="203"><variable id="02100001"><link href="text/shared/01/02100001.xhp">List of Regular Expressions</link> 50*cdf0e10cSrcweir</variable></paragraph> 51*cdf0e10cSrcweir <table id="tbl_id3149517"> 52*cdf0e10cSrcweir <tablerow> 53*cdf0e10cSrcweir <tablecell> 54*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3149741" role="tablehead" l10n="U" oldref="17">Character</paragraph> 55*cdf0e10cSrcweir </tablecell> 56*cdf0e10cSrcweir <tablecell> 57*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3155577" role="tablehead" l10n="U" oldref="18">Result/Use</paragraph> 58*cdf0e10cSrcweir </tablecell> 59*cdf0e10cSrcweir </tablerow> 60*cdf0e10cSrcweir <tablerow> 61*cdf0e10cSrcweir <tablecell> 62*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id6600543" role="tablecontent" l10n="NEW">Any character</paragraph> 63*cdf0e10cSrcweir </tablecell> 64*cdf0e10cSrcweir <tablecell> 65*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id9824518.00000001" role="tablecontent" l10n="CHG">Represents the given character unless otherwise specified.</paragraph> 66*cdf0e10cSrcweir </tablecell> 67*cdf0e10cSrcweir </tablerow> 68*cdf0e10cSrcweir <tablerow> 69*cdf0e10cSrcweir <tablecell> 70*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3152427" role="tablecontent" l10n="U" oldref="19">.</paragraph> 71*cdf0e10cSrcweir </tablecell> 72*cdf0e10cSrcweir <tablecell> 73*cdf0e10cSrcweir <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> 74*cdf0e10cSrcweir </tablecell> 75*cdf0e10cSrcweir </tablerow> 76*cdf0e10cSrcweir <tablerow> 77*cdf0e10cSrcweir <tablecell> 78*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3154682" role="tablecontent" l10n="CHG" oldref="21">^</paragraph> 79*cdf0e10cSrcweir </tablecell> 80*cdf0e10cSrcweir <tablecell> 81*cdf0e10cSrcweir <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> 82*cdf0e10cSrcweir </tablecell> 83*cdf0e10cSrcweir </tablerow> 84*cdf0e10cSrcweir <tablerow> 85*cdf0e10cSrcweir <tablecell> 86*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3159194" role="tablecontent" l10n="CHG" oldref="23">$</paragraph> 87*cdf0e10cSrcweir </tablecell> 88*cdf0e10cSrcweir <tablecell> 89*cdf0e10cSrcweir <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> 90*cdf0e10cSrcweir </tablecell> 91*cdf0e10cSrcweir </tablerow> 92*cdf0e10cSrcweir <tablerow> 93*cdf0e10cSrcweir <tablecell> 94*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3156414" role="tablecontent" l10n="U" oldref="25">*</paragraph> 95*cdf0e10cSrcweir </tablecell> 96*cdf0e10cSrcweir <tablecell> 97*cdf0e10cSrcweir <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> 98*cdf0e10cSrcweir </tablecell> 99*cdf0e10cSrcweir </tablerow> 100*cdf0e10cSrcweir <tablerow> 101*cdf0e10cSrcweir <tablecell> 102*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3147399" role="tablecontent" l10n="U" oldref="27">+</paragraph> 103*cdf0e10cSrcweir </tablecell> 104*cdf0e10cSrcweir <tablecell> 105*cdf0e10cSrcweir <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> 106*cdf0e10cSrcweir <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> 107*cdf0e10cSrcweir </tablecell> 108*cdf0e10cSrcweir </tablerow> 109*cdf0e10cSrcweir <tablerow> 110*cdf0e10cSrcweir <tablecell> 111*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3143267" role="tablecontent" l10n="U" oldref="199">?</paragraph> 112*cdf0e10cSrcweir </tablecell> 113*cdf0e10cSrcweir <tablecell> 114*cdf0e10cSrcweir <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> 115*cdf0e10cSrcweir </tablecell> 116*cdf0e10cSrcweir </tablerow> 117*cdf0e10cSrcweir <tablerow> 118*cdf0e10cSrcweir <tablecell> 119*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3166410" role="tablecontent" l10n="U" oldref="158">\</paragraph> 120*cdf0e10cSrcweir </tablecell> 121*cdf0e10cSrcweir <tablecell> 122*cdf0e10cSrcweir <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> 123*cdf0e10cSrcweir </tablecell> 124*cdf0e10cSrcweir </tablerow> 125*cdf0e10cSrcweir <tablerow> 126*cdf0e10cSrcweir <tablecell> 127*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3152945" role="tablecontent" l10n="U" oldref="166">\n</paragraph> 128*cdf0e10cSrcweir </tablecell> 129*cdf0e10cSrcweir <tablecell> 130*cdf0e10cSrcweir <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> 131*cdf0e10cSrcweir <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> 132*cdf0e10cSrcweir <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> 133*cdf0e10cSrcweir </tablecell> 134*cdf0e10cSrcweir </tablerow> 135*cdf0e10cSrcweir <tablerow> 136*cdf0e10cSrcweir <tablecell> 137*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153258" role="tablecontent" l10n="U" oldref="29">\t</paragraph> 138*cdf0e10cSrcweir </tablecell> 139*cdf0e10cSrcweir <tablecell> 140*cdf0e10cSrcweir <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> 141*cdf0e10cSrcweir </tablecell> 142*cdf0e10cSrcweir </tablerow> 143*cdf0e10cSrcweir <tablerow> 144*cdf0e10cSrcweir <tablecell> 145*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3146775" role="tablecontent" l10n="U" oldref="33">\></paragraph> 146*cdf0e10cSrcweir </tablecell> 147*cdf0e10cSrcweir <tablecell> 148*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3148644" role="tablecontent" l10n="U" oldref="34">Only finds the search term if it appears at the end of a word. For example, "book\>" finds "checkbook", but not "bookmark".</paragraph> 149*cdf0e10cSrcweir </tablecell> 150*cdf0e10cSrcweir </tablerow> 151*cdf0e10cSrcweir <tablerow> 152*cdf0e10cSrcweir <tablecell> 153*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3150670" role="tablecontent" l10n="U" oldref="35">\<</paragraph> 154*cdf0e10cSrcweir </tablecell> 155*cdf0e10cSrcweir <tablecell> 156*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153666" role="tablecontent" l10n="CHG" oldref="36">Only finds the search term if it appears at the beginning of a word. For example, "\<book" finds "bookmark", but not "checkbook".</paragraph> 157*cdf0e10cSrcweir </tablecell> 158*cdf0e10cSrcweir </tablerow> 159*cdf0e10cSrcweir <tablerow> 160*cdf0e10cSrcweir <tablecell> 161*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3149576" role="tablecontent" l10n="U" oldref="37">^$</paragraph> 162*cdf0e10cSrcweir </tablecell> 163*cdf0e10cSrcweir <tablecell> 164*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3151245" role="tablecontent" l10n="CHG" oldref="38">Finds an empty paragraph.</paragraph> 165*cdf0e10cSrcweir </tablecell> 166*cdf0e10cSrcweir </tablerow> 167*cdf0e10cSrcweir <tablerow> 168*cdf0e10cSrcweir <tablecell> 169*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3148550" role="tablecontent" l10n="U" oldref="41">^.</paragraph> 170*cdf0e10cSrcweir </tablecell> 171*cdf0e10cSrcweir <tablecell> 172*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3159413" role="tablecontent" l10n="CHG" oldref="42">Finds the first character of a paragraph.</paragraph> 173*cdf0e10cSrcweir </tablecell> 174*cdf0e10cSrcweir </tablerow> 175*cdf0e10cSrcweir <tablerow> 176*cdf0e10cSrcweir <tablecell> 177*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3147282" role="tablecontent" l10n="CHG" oldref="43">& or $0</paragraph> 178*cdf0e10cSrcweir </tablecell> 179*cdf0e10cSrcweir <tablecell> 180*cdf0e10cSrcweir <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> 181*cdf0e10cSrcweir <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> 182*cdf0e10cSrcweir <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> 183*cdf0e10cSrcweir </tablecell> 184*cdf0e10cSrcweir </tablerow> 185*cdf0e10cSrcweir <tablerow> 186*cdf0e10cSrcweir <tablecell> 187*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3145419" role="tablecontent" l10n="U" oldref="172">[abc123]</paragraph> 188*cdf0e10cSrcweir </tablecell> 189*cdf0e10cSrcweir <tablecell> 190*cdf0e10cSrcweir <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> 191*cdf0e10cSrcweir </tablecell> 192*cdf0e10cSrcweir </tablerow> 193*cdf0e10cSrcweir <tablerow> 194*cdf0e10cSrcweir <tablecell> 195*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3156293" role="tablecontent" l10n="U" oldref="174">[a-e]</paragraph> 196*cdf0e10cSrcweir </tablecell> 197*cdf0e10cSrcweir <tablecell> 198*cdf0e10cSrcweir <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> 199*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id100520090232005" role="tablecontent" l10n="NEW">The characters are ordered by their code numbers.</paragraph> 200*cdf0e10cSrcweir </tablecell> 201*cdf0e10cSrcweir </tablerow> 202*cdf0e10cSrcweir <tablerow> 203*cdf0e10cSrcweir <tablecell> 204*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3155994" role="tablecontent" l10n="U" oldref="176">[a-eh-x]</paragraph> 205*cdf0e10cSrcweir </tablecell> 206*cdf0e10cSrcweir <tablecell> 207*cdf0e10cSrcweir <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> 208*cdf0e10cSrcweir </tablecell> 209*cdf0e10cSrcweir </tablerow> 210*cdf0e10cSrcweir <tablerow> 211*cdf0e10cSrcweir <tablecell> 212*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3145318" role="tablecontent" l10n="U" oldref="178">[^a-s]</paragraph> 213*cdf0e10cSrcweir </tablecell> 214*cdf0e10cSrcweir <tablecell> 215*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153351" role="tablecontent" l10n="CHG" oldref="179">Represents everything that is not between a and s.</paragraph> 216*cdf0e10cSrcweir </tablecell> 217*cdf0e10cSrcweir </tablerow> 218*cdf0e10cSrcweir <tablerow> 219*cdf0e10cSrcweir <tablecell> 220*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3156543" role="tablecontent" l10n="U" oldref="180">\xXXXX</paragraph> 221*cdf0e10cSrcweir </tablecell> 222*cdf0e10cSrcweir <tablecell> 223*cdf0e10cSrcweir <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> 224*cdf0e10cSrcweir <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> 225*cdf0e10cSrcweir </tablecell> 226*cdf0e10cSrcweir </tablerow> 227*cdf0e10cSrcweir <tablerow> 228*cdf0e10cSrcweir <tablecell> 229*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153951" role="tablecontent" l10n="U" oldref="186">|</paragraph> 230*cdf0e10cSrcweir </tablecell> 231*cdf0e10cSrcweir <tablecell> 232*cdf0e10cSrcweir <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> 233*cdf0e10cSrcweir </tablecell> 234*cdf0e10cSrcweir </tablerow> 235*cdf0e10cSrcweir <tablerow> 236*cdf0e10cSrcweir <tablecell> 237*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3147376" role="tablecontent" l10n="U" oldref="209">{2}</paragraph> 238*cdf0e10cSrcweir </tablecell> 239*cdf0e10cSrcweir <tablecell> 240*cdf0e10cSrcweir <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> 241*cdf0e10cSrcweir </tablecell> 242*cdf0e10cSrcweir </tablerow> 243*cdf0e10cSrcweir <tablerow> 244*cdf0e10cSrcweir <tablecell> 245*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3151289" role="tablecontent" l10n="U" oldref="211">{1,2}</paragraph> 246*cdf0e10cSrcweir </tablecell> 247*cdf0e10cSrcweir <tablecell> 248*cdf0e10cSrcweir <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> 249*cdf0e10cSrcweir </tablecell> 250*cdf0e10cSrcweir </tablerow> 251*cdf0e10cSrcweir <tablerow> 252*cdf0e10cSrcweir <tablecell> 253*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id4870754" role="tablecontent" l10n="NEW">{1,}</paragraph> 254*cdf0e10cSrcweir </tablecell> 255*cdf0e10cSrcweir <tablecell> 256*cdf0e10cSrcweir <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> 257*cdf0e10cSrcweir </tablecell> 258*cdf0e10cSrcweir </tablerow> 259*cdf0e10cSrcweir <tablerow> 260*cdf0e10cSrcweir <tablecell> 261*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3148616" role="tablecontent" l10n="U" oldref="213">( )</paragraph> 262*cdf0e10cSrcweir </tablecell> 263*cdf0e10cSrcweir <tablecell> 264*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id2701803" role="tablecontent" l10n="NEW">In the <emph>Search for</emph> box:</paragraph> 265*cdf0e10cSrcweir <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> 266*cdf0e10cSrcweir <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> 267*cdf0e10cSrcweir <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> 268*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id9200109" role="tablecontent" l10n="NEW">In the <emph>Replace with</emph> box:<comment>i83322</comment></paragraph> 269*cdf0e10cSrcweir <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> 270*cdf0e10cSrcweir </tablecell> 271*cdf0e10cSrcweir </tablerow> 272*cdf0e10cSrcweir <tablerow> 273*cdf0e10cSrcweir <tablecell> 274*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3154790" role="tablecontent" l10n="U" oldref="226">[:alpha:]</paragraph> 275*cdf0e10cSrcweir </tablecell> 276*cdf0e10cSrcweir <tablecell> 277*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3147397" role="tablecontent" l10n="CHG" oldref="227">Represents an alphabetic character. Use [:alpha:]+ to find one of them.</paragraph> 278*cdf0e10cSrcweir </tablecell> 279*cdf0e10cSrcweir </tablerow> 280*cdf0e10cSrcweir <tablerow> 281*cdf0e10cSrcweir <tablecell> 282*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3152885" role="tablecontent" l10n="U" oldref="216">[:digit:]</paragraph> 283*cdf0e10cSrcweir </tablecell> 284*cdf0e10cSrcweir <tablecell> 285*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3150010" role="tablecontent" l10n="CHG" oldref="217">Represents a decimal digit. Use [:digit:]+ to find one of them.</paragraph> 286*cdf0e10cSrcweir </tablecell> 287*cdf0e10cSrcweir </tablerow> 288*cdf0e10cSrcweir <tablerow> 289*cdf0e10cSrcweir <tablecell> 290*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153743" role="tablecontent" l10n="U" oldref="224">[:alnum:]</paragraph> 291*cdf0e10cSrcweir </tablecell> 292*cdf0e10cSrcweir <tablecell> 293*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153281" role="tablecontent" l10n="CHG" oldref="225">Represents an alphanumeric character ([:alpha:] and [:digit:]).</paragraph> 294*cdf0e10cSrcweir </tablecell> 295*cdf0e10cSrcweir </tablerow> 296*cdf0e10cSrcweir <tablerow> 297*cdf0e10cSrcweir <tablecell> 298*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3153726" role="tablecontent" l10n="U" oldref="218">[:space:]</paragraph> 299*cdf0e10cSrcweir </tablecell> 300*cdf0e10cSrcweir <tablecell> 301*cdf0e10cSrcweir <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> 302*cdf0e10cSrcweir </tablecell> 303*cdf0e10cSrcweir </tablerow> 304*cdf0e10cSrcweir <tablerow> 305*cdf0e10cSrcweir <tablecell> 306*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3150486" role="tablecontent" l10n="U" oldref="220">[:print:]</paragraph> 307*cdf0e10cSrcweir </tablecell> 308*cdf0e10cSrcweir <tablecell> 309*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3150872" role="tablecontent" l10n="CHG" oldref="221">Represents a printable character.</paragraph> 310*cdf0e10cSrcweir </tablecell> 311*cdf0e10cSrcweir </tablerow> 312*cdf0e10cSrcweir <tablerow> 313*cdf0e10cSrcweir <tablecell> 314*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3155854" role="tablecontent" l10n="U" oldref="222">[:cntrl:]</paragraph> 315*cdf0e10cSrcweir </tablecell> 316*cdf0e10cSrcweir <tablecell> 317*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3152576" role="tablecontent" l10n="CHG" oldref="223">Represents a nonprinting character.</paragraph> 318*cdf0e10cSrcweir </tablecell> 319*cdf0e10cSrcweir </tablerow> 320*cdf0e10cSrcweir <tablerow> 321*cdf0e10cSrcweir <tablecell> 322*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3149958" role="tablecontent" l10n="U" oldref="228">[:lower:]</paragraph> 323*cdf0e10cSrcweir </tablecell> 324*cdf0e10cSrcweir <tablecell> 325*cdf0e10cSrcweir <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> 326*cdf0e10cSrcweir </tablecell> 327*cdf0e10cSrcweir </tablerow> 328*cdf0e10cSrcweir <tablerow> 329*cdf0e10cSrcweir <tablecell> 330*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id3148455" role="tablecontent" l10n="U" oldref="230">[:upper:]</paragraph> 331*cdf0e10cSrcweir </tablecell> 332*cdf0e10cSrcweir <tablecell> 333*cdf0e10cSrcweir <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> 334*cdf0e10cSrcweir </paragraph> 335*cdf0e10cSrcweir </tablecell> 336*cdf0e10cSrcweir </tablerow> 337*cdf0e10cSrcweir </table> 338*cdf0e10cSrcweir 339*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="hd_id5311441" role="heading" level="2" l10n="NEW">Examples</paragraph> 340*cdf0e10cSrcweir 341*cdf0e10cSrcweir<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> 342*cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id952368773" role="paragraph" l10n="NEW">^([:digit:])$ -- finds lines or cells with exactly one digit.</paragraph> 343*cdf0e10cSrcweir 344*cdf0e10cSrcweir 345*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id9568773" role="paragraph" l10n="NEW">You can combine the search terms to form complex searches.</paragraph> 346*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="hd_id71413" role="heading" level="3" l10n="NEW">To find three-digit numbers alone in a paragraph</paragraph> 347*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id2924283" role="code" l10n="NEW">^[:digit:]{3}$</paragraph> 348*cdf0e10cSrcweir <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> 349*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id6942045" role="paragraph" l10n="NEW">[:digit:] matches any decimal digit, </paragraph> 350*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id4721823" role="paragraph" l10n="NEW">{3} means there must be exactly 3 copies of "digit", </paragraph> 351*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id5806756" role="paragraph" l10n="NEW">$ means the match must end a paragraph. </paragraph> 352*cdf0e10cSrcweir <section id="relatedtopics"> 353*cdf0e10cSrcweir <embed href="text/shared/01/02100000.xhp#02100000"/> 354*cdf0e10cSrcweir<switch select="appl"> 355*cdf0e10cSrcweir<case select="WRITER"><embed href="text/swriter/guide/search_regexp.xhp#search_regexp"/> 356*cdf0e10cSrcweir <embed href="text/swriter/guide/finding.xhp#finding"/> 357*cdf0e10cSrcweir</case> 358*cdf0e10cSrcweir</switch> 359*cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id1751457" role="paragraph" l10n="NEW"><link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Regular_Expressions_in_Writer">Wiki page about regular expressions in Writer</link></paragraph> 360*cdf0e10cSrcweir <paragraph xml-lang="en-US" id="par_id5483870" role="paragraph" l10n="NEW"><link href="http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Regular_Expressions_in_Calc">Wiki page about regular expressions in Calc</link></paragraph> 361*cdf0e10cSrcweir </section> 362*cdf0e10cSrcweir </body> 363*cdf0e10cSrcweir</helpdocument>