#NEWLINE# def test_re_inverse( self ) : #NEWLINE# #INDENT# import sre_parse #NEWLINE# RE = '(firstleft|)somestring(\\s.*|) \\S(a|b) [fgh]+ {2,3}R(\\S)' #NEWLINE# print ( sre_parse . parse ( RE ) ) #NEWLINE# for i in range ( 20 ) : #NEWLINE# #INDENT# ms = re_inverse . make_match_string ( RE ) #NEWLINE# #UNINDENT# for i in range ( 20 ) : #NEWLINE# #INDENT# ms = re_inverse . make_nonmatch_string ( RE )