File: example.py

package info (click to toggle)
tre 0.7.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,144 kB
  • ctags: 806
  • sloc: ansic: 9,636; sh: 8,959; makefile: 207; python: 36; sed: 16
file content (13 lines) | stat: -rw-r--r-- 184 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]