[EMAIL PROTECTED] writes:
> multipleSpaces = re.compile(u'\\h+')
>
> importantTextString = '\n \n \n \t\t '
> importantTextString = multipleSpaces.sub("M", importantTextString)
Please get into the habit of following the Python coding style guide
http://www.python.org/dev/peps/pep-0008>.
For
On Sep 13, 12:52 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > multipleSpaces = re.compile(u'\\h+')
>
> > importantTextString = '\n \n \n \t\t '
> > importantTextString = multipleSpaces.sub("M", importantTextString)
>
> what's "\\h" supposed to mean?
Match *h*orizo
[EMAIL PROTECTED] wrote:
multipleSpaces = re.compile(u'\\h+')
importantTextString = '\n \n \n \t\t '
importantTextString = multipleSpaces.sub("M", importantTextString)
what's "\\h" supposed to mean?
I would have expected consecutive spaces and tabs to be replaced by M
but nothing is bein
multipleSpaces = re.compile(u'\\h+')
importantTextString = '\n \n \n \t\t '
importantTextString = multipleSpaces.sub("M", importantTextString)
I would have expected consecutive spaces and tabs to be replaced by M
but nothing is being replaced. If I try the following, then I'm left
only with M,