Oracle Text Reference
Release 9.0.1

Part Number A90121-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Special Characters in Queries, 3 of 4


Escape Characters

To query on words or symbols that have special meaning to query expressions such as and & or| accum, you must escape them. There are two ways to escape characters in a query expression:

Escape Character  Description 

{} 

Use braces to escape a string of characters or symbols. Everything within a set of braces in considered part of the escape sequence.

When you use braces to escape a single character, the escaped character becomes a separate token in the query. 

Use the backslash character to escape a single character or symbol. Only the character immediately following the backslash is escaped.  

In the following examples, an escape sequence is necessary because each expression contains a Text operator or reserved symbol:

'AT\&T'
'{AT&T}'

'high\-voltage'
'{high-voltage}'


Note:

If you use braces to escape an individual character within a word, the character is escaped, but the word is broken into three tokens.

For example, a query written as high{-}voltage searches for high - voltage, with the space on either side of the hyphen. 


Querying Escape Characters

The open brace { signals the beginning of the escape sequence, and the closed brace } indicates the end of the sequence. Everything between the opening brace and the closing brace is part of the escaped query expression (including any open brace characters). To include the close brace character in an escaped query expression, use }}.

To escape the backslash escape character, use \\.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback