HPlogo System Debug Reference Manual: HP 3000 MPE/iX Computer Systems > Appendix A Patterns and Regular Expressions

Literal Expressions (Match Exactly These Characters)

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Any literal character, such as "c", is a regular expression and matches that same character in the text being scanned. Regular expressions may be concatenated: a regular expression followed by another regular expression forms a new regular expression that matches anything matched by the first followed immediately by anything matched by the second. A sequence of literal characters is an example of concatenated expressions. For example, "c0000000" or "computer" is a pattern that matches any occurrence of that sequence of characters in the line it is being compared against.

A regular expression is said to match part of a text line if the text line contains an occurrence of the regular expression. For example, the pattern "aa" matches the line "aabc" once at position 1, and the line "aabcaabc" in two places, and the line "aaaaaa" in five (overlapping) places. Matching is done on a line-by-line basis; no regular expression can match across a line boundary.

Feedback to webmaster