How to Use Topic Patterns in MapRStreams Data Objects

How to Use Topic Patterns in MapRStreams Data Objects

Converting COBOL Syntax to perl Compatible Regular Expression Syntax

Converting COBOL Syntax to perl Compatible Regular Expression Syntax

If you are familiar with COBOL syntax, use the following information to help you write perl compatible regular expressions.
The following table describes examples of COBOL syntax and their perl compatible equivalents:
COBOL Syntax
perl Syntax
Description
9
\d
Matches one instance of any digit from 0-9.
9999
\d\d\d\d
or
\d{4}
Matches any four digits from 0-9, as in 1234 or 5936.
x
[a-z]
Matches one instance of a letter.
9xx9
\d[a-z][a-z]\d
Matches any number followed by two letters and another number, as in 1ab2.

0 COMMENTS

We’d like to hear from you!