contentsconceptssyntaxlibrariessampleserrorsindex
Full text search
operator   matches    
  Related Syntax    

Syntax

  string-expression matches unanchored? pattern


Purpose

Provides a general way to test the contents of a string expression by matching it against an OmniMark pattern. When only one pattern is being tried, the most convenient way to do this is often by using the matches operator.

The matches operator takes two operands: the string-expression being scanned and the pattern against which it is matched.

The keyword unanchored is used when the pattern can appear anywhere in the string; otherwise, the pattern must appear at the beginning of the string-expression for a match to succeed.

Parentheses must be used to enclose the pattern if it consists of more than one component.

If there is more than one pattern to scan, it is often easier and more efficient to use do scan.

Usage example:

  do when attribute codes matches unanchored (word-start "ok" word-end)
        ...
  done

    Related Syntax
   do scan
 
 
----  

Top [CONTENTS] [CONCEPTS] [SYNTAX] [LIBRARIES] [SAMPLES] [ERRORS] [INDEX]

Generated: April 21, 1999 at 2:01:11 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © OmniMark Technologies Corporation, 1988-1999.