def register_regex_entity(self, regex_str, domain=<NUM_LIT:0>):
if domain not in self.domains:<EOL><INDENT>self.register_domain(domain=domain)<EOL><DEDENT>self.domains[domain].register_regex_entity(regex_str=regex_str)<EOL>
A regular expression making use of python named group expressions.

Example: (?P<Artist>.*)

Args:
    regex_str(str): a string representing a regular expression as defined above
    domain(str): a string representing the domain you wish to add the entity to