Version 1.0
Copyright © 2022 Lowell D. Thomas
Python APG
 … an ABNF Parser Generator
Namespaces | Variables
multiline.py File Reference

Demonstrates mimicking the multi-line mode flag of regex. More...

Go to the source code of this file.

Namespaces

 examples.exp.multiline
 

Variables

string examples.exp.multiline.title
 
string examples.exp.multiline.pattern = 'line = beg "The " animal " in the hat." end\n'
 
string examples.exp.multiline.input = 'The cat in the hat.\n'
 
string examples.exp.multiline.header = 'RESULT'
 
int examples.exp.multiline.testno = 0
 
string examples.exp.multiline.re_pattern = r'^The (cat|dog|bird|mouse) in the hat.$'
 
 examples.exp.multiline.matches = re.finditer(re_pattern, input, re.M)
 
 examples.exp.multiline.end
 
 examples.exp.multiline.exp = ApgExp(pattern, 'g')
 
 examples.exp.multiline.result = exp.exec(input)
 

Detailed Description

Demonstrates mimicking the multi-line mode flag of regex.

Definition in file multiline.py.

Python APG, Version 1.0, is licensed under the 2-Clause BSD License,
an Open Source Initiative Approved License.