swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Syntax   Related Concepts  
rule  

find

 
 

Syntax

find pattern condition?
   local-declarations*
   action*


Purpose

A rule that defines a pattern to be matched in a source that is being scanned as a result of a submit statement.

When a pattern occurs in the current input which matches the pattern specified for the find rule, the rule is fired, causing the events associated with the rule to be executed.

When there is more than one find rule that can be selected, OmniMark will choose the one that appears earliest in the program.

When a find rule is selected, the input matched by the pattern is consumed and cannot be matched again. (OmniMark provides the lookahead operator to allow patterns to match without consuming the input.) Input matched by the pattern can be captured in pattern variables for later use in the actions associated with the rule.

A find rule must match at least one character, or one position in the input.

Any input that does not cause a find rule to fire is copied unchanged to the current output.

    Related Syntax
   lookahead, lookahead not
   do sgml-parse
   do xml-parse
 
Related Concepts
   Finite state machines
   Pattern matching
   Pattern matching functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:33:48 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.