User Guide : Using Content Extraction Language : Pattern Matching and Action Statements
Share this page             
Pattern Matching and Action Statements
This section provides information on pattern matching and action statement. The following topics are covered:
CXL Patterns
Expressions in Patterns
Regular Expression
Comparison Expressions
Actions and Statements
Expressions in Statements
Comment Statements
Assignment Statements
Catchup Statements
Control Statements
Output Statements
The main part of a script is a sequence of pattern-action statements.
Pattern { action statements }
Pattern { action statements }
The pattern comes first, and then the action. Either the pattern or action may be missing in a statement. If the pattern is missing, the action will be executed for every single input line. A pattern with a missing action does nothing. Since the pattern or action may be missing, action statements are enclosed in {and} to distinguish them from patterns.