<s> import re <EOL> from native_tags . decorators import comparison , function <EOL> def matches ( pattern , text ) : <EOL> '<STR_LIT>' <EOL> return re . compile ( str ( pattern ) ) . match ( text ) <EOL> matches = comparison ( matches ) <EOL> matches . test = { '<STR_LIT:args>' : ( '<STR_LIT>' , '<STR_LIT:_>' ) , '<STR_LIT:result>' : None } <EOL> def substitute ( search , replace , text ) : <EOL> '<STR_LIT>' <EOL> return re . sub ( re . compile ( str ( search ) ) , replace , text ) <EOL> substitute = function ( substitute ) <EOL> substitute . test = { '<STR_LIT:args>' : ( '<STR_LIT:w>' , '<STR_LIT:f>' , '<STR_LIT>' ) , '<STR_LIT:result>' : '<STR_LIT>' } <EOL> def search ( pattern , text ) : <EOL> '<STR_LIT>' <EOL> return re . compile ( str ( pattern ) ) . search ( str ( text ) ) <EOL> search = function ( search ) <EOL> search . test = { '<STR_LIT:args>' : ( '<STR_LIT>' , '<STR_LIT>' ) , '<STR_LIT:result>' : None } </s>
