|
Regular Expressions
Used a lot in Perl parsing
Not powerful enough to parse a AC line
>>> import re
>>> pat = re.compile(r"AC (\w+);( (\w+);)*$")
>>> matches = pat.match("AC P97430; O09081; O09082;")
>>> matches.groups()
('P97430', ' O09082;', 'O09082')
>>>
Can be used to identify/validate it.
Evalutated a parse tree -- then flattened it.
I want that parse tree!
|
|