File: example.py

package info (click to toggle)
tre 0.7.5-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,572 kB
  • ctags: 922
  • sloc: ansic: 10,943; sh: 9,502; makefile: 219; python: 36; sed: 16
file content (13 lines) | stat: -rw-r--r-- 171 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
import tre

fz = tre.Fuzzyness(maxcost = 3)

print fz

pt = tre.compile("(foo)(bar)", tre.EXTENDED)

m = pt.match("zoobag", fz)

if m:
    print m.groups()
    print m[2]