bskinn / pent

pent Extracts Numerical Text -- Mini-language driven parser for structured numerical data in text
MIT License
20 stars 3 forks source link

Add examples of literal token eccentricity to space_after tutorial example #85

Open bskinn opened 5 years ago

bskinn commented 5 years ago

E.g.:

>>> pent.Parser(body="@!+-").capture_body("----")
[[['----']]]
>>> pent.Parser(body="@!+-").capture_body("-- --")
[]
>>> pent.Parser(body="@!+-").capture_body("- - - -")
[]
>>> pent.Parser(body="'@!+- '").capture_body("- - - -")
[]
>>> pent.Parser(body="'@!+- '").capture_body("- - - - ")
[[['-', '-', '-', '-']]]
>>> pent.Parser(body="'@!+- '").capture_body("- - - -")
[]
>>> pent.Parser(body="'@!+- ' @.-").capture_body("- - - -")
[]
>>> pent.Parser(body="'@!+- ' @!.-").capture_body("- - - -")
[]
>>> pent.Parser(body="'@x!+- ' @!.-").capture_body("- - - -")
[[['-', '-', '-', '-']]]