'Apply the given transformation to the string encoding of this
``ChunkString``.  In particular, find all occurrences that match
``regexp``, and replace them using ``repl`` (as done by
``re.sub``).
This transformation should only add and remove braces; it
should *not* modify the sequence of angle-bracket delimited
tags.  Furthermore, this transformation may not result in
improper bracketing.  Note, in particular, that bracketing may
not be nested.
:type regexp: str or regexp
:param regexp: A regular expression matching the substring
that should be replaced.  This will typically include a
named group, which can be used by ``repl``.
:type repl: str
:param repl: An expression specifying what should replace the
matched substring.  Typically, this will include a named
replacement group, specified by ``regexp``.
:rtype: None
:raise ValueError: If this transformation generated an
invalid chunkstring.'

def xform(self, regexp, repl):

    s = re.sub(regexp, repl, self._str)
    s = re.sub(u'\\{\\}', u'', s)
    if (self._debug > 1):
        self._verify(s, (self._debug - 2))
    self._str = s
