def prepare_realm_pattern(source):
 return (('(?<![^\\s\'"\\(,:<])(?P<name>' + source) + ')(?!\\w)')

def prepare_realm_pattern ( source ) : return ( ( '(?<![^\\s\'"\\(,:<])(?P<name>' + source ) + ')(?!\\w)' )
augment a realm filter so it only matches after start-of-string .