(self, m)
return replacement
Returns literal strings unchanged, replaces other inputs with group 2.

    Other inputs are replaced with the contents of capture 1.  This is either
    a single space or an empty string.

    Args:
      m: The match object returned by re.search.

    Returns:
      The string that should be inserted instead of the matched text.
Returns literal strings unchanged, replaces other inputs with group 2.
Returns literal strings unchanged replaces other inputs with group 2 .
def RemoveSpaces(self, m):
    """Returns literal strings unchanged, replaces other inputs with group 2.

    Other inputs are replaced with the contents of capture 1.  This is either
    a single space or an empty string.

    Args:
      m: The match object returned by re.search.

    Returns:
      The string that should be inserted instead of the matched text.
    """
    entire_match = m.group(0)
    replacement = m.group(1)
    if re.match(r"'.*'$", entire_match):
      return entire_match
    if re.match(r'".*"$', entire_match):
      return entire_match
    if re.match(r"`.*`$", entire_match):
      return entire_match
    if re.match(r"/.+/$", entire_match):
      return entire_match
    return replacement
def RemoveSpaces ( self , m ) : entire_match = m . group ( 0 ) replacement = m . group ( 1 ) if re . match ( r"'.*'$" , entire_match ) : return entire_match if re . match ( r'".*"$' , entire_match ) : return entire_match if re . match ( r"`.*`$" , entire_match ) : return entire_match if re . match ( r"/.+/$" , entire_match ) : return entire_match return replacement