please dont rip this site

MATCHES Predicate

The MATCHES predicate performs SQL queries using regular expression pattern matching. This type of pattern matching is more powerful than the wildcard pattern matching available with the LIKE predicate.

Syntax

MATCHES (Column_Reference, ' { Grouped_Search_Pattern | Counted_Search_Pattern } ') > 0

Elements

Column_Reference  Specifies the column name (alias). Its data type must be compatible with the format of the Search_Pattern specified.
  
Grouped_Search_Pattern  Specifies matches against multiple patterns.
  
Counted_Search_Pattern  Specifies searches for repetitions of the same pattern. You can request:
  • Exactly m matches
  • At least m matches
  • Between m and n occurrences of the search pattern

MATCH Symbols

A grouped or counted search pattern is formed like a literal of type Basic String but consists of a combination of characters and regular expressions (match symbols). Index Server is not case sensitive to characters in a search pattern other than the match symbols. The following table lists and describes the regular expressions that you can use with the MATCH predicate:

Name Symbol Description
Asterisk * Matches 0 or more occurrences of the search pattern.
Question mark ? Matches 0 or 1 occurrence of the preceding pattern.
Plus sign + Matches 1 or more occurrences of the preceding pattern.
Parentheses ( ) Use to delimit search patterns > 1 character.
Curly braces { } Use to delimit a counted match.
Square Brackets [ ] Use to specify a range of characters in a pattern.
Vertical bar | Use as an escape character that must precede any of the above symbols. Commas separating OR clauses in the matching terms must also be preceded the escape character.

Examples

  1. The following example uses a grouped match. The pattern matches authors with the names "McAlister", and "McAllister" (names such as "McAlllister", if they existed, would also be matched). Note how the vertical-bar escape character precedes the embedded parentheses, as well as the commas.

    ...WHERE MATCHES (DocAuthor, '(MacAl|+ister' )> 0
  2. The following example matches any string in which exactly three instances of the pattern "Bora" occur.

    ...WHERE MATCHES (DocText, '|(Bora|)|{3|}' ) > 0
  3. The following example matches any string in which at least two instances of the pattern "Bora" occurs.

    ...WHERE MATCHES (DocText, '|(Bora|)|{2,|}' ) > 0
  4. The following example matches any string in which between two and three instances of the pattern "Bora" occurs.

    ...WHERE MATCHES (DocText, '|(Bora|)|{2,3|}' ) > 0

© 1997 by Microsoft Corporation. All rights reserved.


file: /Techref/language/asp/ix/ixsemat.htm, 6KB, , updated: 1997/9/29 03:23, local time: 2024/7/17 01:35,
TOP NEW HELP FIND: 
3.141.38.154:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://techref.massmind.org/techref/language/asp/ix/ixsemat.htm"> SQL Access to Index Server Data: MATCHES Predicate</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to techref.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .