Difference between revisions of "Documentation/UserGuide/SearchReplace"

From Apache OpenOffice Wiki
Jump to: navigation, search
(A note about Regular Expressions)
m (Minor grammatical change)
Line 45: Line 45:
 
With Regular Expressions (usually abbreviated RegExp) there are characters and constructions that have a general meaning and can be used to match several results at once. For example, the expression [:alpha:] will find any alphabetic character, but not numbers or punctuation signs nor spaces, [:number:] will find numbers but not other characters and [:any:] will find anything.  
 
With Regular Expressions (usually abbreviated RegExp) there are characters and constructions that have a general meaning and can be used to match several results at once. For example, the expression [:alpha:] will find any alphabetic character, but not numbers or punctuation signs nor spaces, [:number:] will find numbers but not other characters and [:any:] will find anything.  
  
[[Documentation/UserGuide/Advanced/RegExp|On a different article]] a general introduction to RegExp is be provided.  
+
[[Documentation/UserGuide/Advanced/RegExp|In a different article]] a general introduction to RegExp is be provided.  
  
 
[[Category:Documentation]]
 
[[Category:Documentation]]

Revision as of 01:08, 17 March 2013

Template:Documentation/DraftPage


Basic Find & Replace

Searching for text is a common task on every office application. Apache OpenOffice offers a powerful tool for this task that can be used on different complexity levels.

With Edit → Find & Replace or just  Ctrl  +  F , every Apache OpenOffice component will show the following tool

AOO-FindReplace.png

As you can see from the screenshot, the options are quite simple: just type what you want to find, the replacement text and use one of the buttons  Find  to find the first instance below the cursor position,  Find All  to find all instances on the document,  Replace  to replace the first instance below the cursor position and  Replace All  to replace all instances on the document.


The "Match case" option will find only those instances that are written the same way: for example, if you search for "Word" and set "Match case", Apache OpenOffice will find "Word", "Words", "Wording"... but not "word". With "Whole words only", the tool will only find "word" but not "wording".


Quick search on Writer

On Writer there is a toolbar that can be used for a quick search

AOO-QuickSearch.png

This toolbar works as the search toolbars on browsers: insert a short text, and search forwards or upwards with the two arrows on the right.

More options

The  More Options  button offers several advanced tools. Which tools are offered depends on the Apache OpenOffice component used: for example, on Writer it is possible to search for styles and inside Notes, functions not available on Draw nor Impress.

On most components it is possible to search "Backwards": from cursor position towards the beginning of the document, instead of the default option towards the end of the document.

Also available on most components is the option "Current selection only": if previously to the search you select some part of the document (a few paragraph on Writer, a block of cell on Calc, several graphical objects on Draw or Impress) and the option is checked, the search tool will only look on that selection.

The "Similarity search" gives some flexibility to the search looking also for exchanged characters, for example (searching for "also" with this option will find "laos" too).

Some options are specific of one or few components, like "Regular expressions", "Search for styles"  Attributes , etcetera. These differences will be considered on the corresponding sections of this guide.

Template:Documentation/Note

A note about Regular Expressions

Regular expressions are an unlimited extension of the old "wildcard" (generally, the asterisk) used on almost every operating system to search for file names of which not all its characters are known.

With Regular Expressions (usually abbreviated RegExp) there are characters and constructions that have a general meaning and can be used to match several results at once. For example, the expression [:alpha:] will find any alphabetic character, but not numbers or punctuation signs nor spaces, [:number:] will find numbers but not other characters and [:any:] will find anything.

In a different article a general introduction to RegExp is be provided.

Personal tools