<s> import os , sys ; sys . path . insert ( <NUM_LIT:0> , os . path . join ( os . path . dirname ( __file__ ) , "<STR_LIT:..>" , "<STR_LIT:..>" ) ) <EOL> from pattern . search import match <EOL> from pattern . en import parsetree <EOL> s = "<STR_LIT>" <EOL> t = parsetree ( s ) <EOL> print match ( "<STR_LIT>" , t ) . group ( <NUM_LIT:1> ) <EOL> print <EOL> s = "<STR_LIT>" <EOL> t = parsetree ( s ) <EOL> m = match ( "<STR_LIT>" , t ) <EOL> for w in m : <EOL> if m . constraint ( w ) . index == <NUM_LIT:2> : <EOL> print "<STR_LIT>" , w <EOL> if m . constraint ( w ) . index == <NUM_LIT:3> : <EOL> print "<STR_LIT>" , w <EOL> m = match ( "<STR_LIT>" , t ) <EOL> print <EOL> print "<STR_LIT>" , m . group ( <NUM_LIT:1> ) <EOL> print "<STR_LIT>" , m . group ( <NUM_LIT:2> ) <EOL> print <EOL> print m . group ( <NUM_LIT:0> ) </s>
