xref: /trunk/main/helpcontent2/source/text/swriter/guide/search_regexp.xhp (revision 6fd2419af095b9e12baf06e33db2129edf4d719b)
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--***********************************************************
4 *
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements.  See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership.  The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License.  You may obtain a copy of the License at
12 *
13 *   http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied.  See the License for the
19 * specific language governing permissions and limitations
20 * under the License.
21 *
22 ***********************************************************-->
23
24<helpdocument version="1.0">
25<meta>
26<topic id="textswriterguidesearch_regexpxml" indexer="include" status="PUBLISH">
27<title xml-lang="en-US" id="tit">Using Wildcards in Text Searches</title>
28<filename>/text/swriter/guide/search_regexp.xhp</filename>
29</topic>
30</meta>
31<body>
32<bookmark xml-lang="en-US" branch="index" id="bm_id3150099">
33<bookmark_value>wildcards, see regular expressions</bookmark_value>
34<bookmark_value>searching; with wildcards</bookmark_value>
35<bookmark_value>regular expressions;searching</bookmark_value>
36<bookmark_value>examples for regular expressions</bookmark_value>
37<bookmark_value>characters;finding all</bookmark_value>
38<bookmark_value>invisible characters;finding</bookmark_value>
39<bookmark_value>paragraph marks;searching</bookmark_value>
40</bookmark><comment>mw deleted "wildcards;" and inserted wildcards crossreference</comment><comment>mw added "paragraph marks;"</comment>
41<paragraph xml-lang="en-US" id="hd_id3150099" role="heading" level="1" l10n="U"><variable id="search_regexp"><link href="text/swriter/guide/search_regexp.xhp">Using Wildcards in Text Searches</link>
42</variable></paragraph>
43<paragraph xml-lang="en-US" id="par_id0509200916345516" role="paragraph" l10n="NEW">Wildcards or placeholders can be used to search for some unspecified or even invisible characters.</paragraph>
44<paragraph xml-lang="en-US" id="par_id3155182" role="paragraph">You can use wildcards when you find and replace text in a document. For example, "s.n" finds "sun" and "son".</paragraph>
45<list type="ordered">
46<listitem>
47<paragraph xml-lang="en-US" id="par_id3155907" role="listitem" l10n="U">Choose <item type="menuitem">Edit - Find &amp; Replace</item>.</paragraph>
48</listitem>
49<listitem>
50<paragraph xml-lang="en-US" id="par_id2142399" role="listitem" l10n="NEW">Click <item type="menuitem">More Options</item> to expand the dialog.</paragraph>
51</listitem>
52<listitem>
53<paragraph xml-lang="en-US" id="par_id3155861" role="listitem" l10n="U">Select the <item type="menuitem">Regular expressions</item> check box.</paragraph>
54</listitem>
55<listitem>
56<paragraph xml-lang="en-US" id="par_id3149843" role="listitem" l10n="U">In the <item type="menuitem">Search for</item> box, type the search term and the wildcard(s) that you want to use in your search.</paragraph>
57</listitem>
58<listitem>
59<paragraph xml-lang="en-US" id="par_id3156113" role="listitem" l10n="U">Click <item type="menuitem">Find</item> or <item type="menuitem">Find All</item>.</paragraph>
60</listitem>
61</list>
62<paragraph xml-lang="en-US" id="hd_id3153401" role="heading" level="2" l10n="U">Regular Expression Examples</paragraph>
63<list type="ordered">
64<listitem>
65<paragraph xml-lang="en-US" id="par_id3149641" role="listitem">The wildcard for a single character is a period (.).</paragraph>
66</listitem>
67<listitem>
68<paragraph xml-lang="en-US" id="par_id3153136" role="listitem">The wildcard for zero or more occurrences of the previous character is an asterisk. For example: "123*" finds "12" "123", and "1233".</paragraph>
69</listitem>
70<listitem>
71<paragraph xml-lang="en-US" id="par_id3149609" role="listitem">The wildcard combination to search for zero or more occurrences of any character is a period and asterisk (.*).</paragraph>
72</listitem>
73<listitem>
74<paragraph xml-lang="en-US" id="par_id3149854" role="listitem" l10n="CHG">The wildcard for the end of a paragraph is a dollar sign ($). The wildcard character combination for the start of a paragraph is a caret and a period (^.).</paragraph>
75</listitem>
76<listitem>
77<paragraph xml-lang="en-US" id="par_id0509200916345545" role="listitem" l10n="NEW">The wildcard for a tab character is \t.</paragraph>
78</listitem>
79</list>
80<paragraph xml-lang="en-US" id="par_id3153414" role="note" l10n="CHG">A search using a regular expression will work only within one paragraph. To search using a regular expression in more than one paragraph, do a separate search in each paragraph.</paragraph>
81<section id="relatedtopics">
82<paragraph xml-lang="en-US" id="par_id3149875" role="paragraph" l10n="U"><link href="text/shared/01/02100001.xhp" name="List of Wildcards">List of Wildcards</link></paragraph>
83</section>
84</body>
85</helpdocument>
86