Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #76392

Re: string encoding regex problem

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!panix!roy
From Roy Smith <roy@panix.com>
Newsgroups comp.lang.python
Subject Re: string encoding regex problem
Date Fri, 15 Aug 2014 22:14:13 -0400
Organization PANIX Public Access Internet and UNIX, NYC
Lines 15
Message-ID <roy-0CDBF3.22141315082014@news.panix.com> (permalink)
References <lsm8ic$j90$1@online.de> <roy-7B58DA.20484615082014@news.panix.com> <lsmeej$49n$1@online.de>
NNTP-Posting-Host localhost
X-Trace reader1.panix.com 1408155253 28390 127.0.0.1 (16 Aug 2014 02:14:13 GMT)
X-Complaints-To abuse@panix.com
NNTP-Posting-Date Sat, 16 Aug 2014 02:14:13 +0000 (UTC)
User-Agent MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
Xref csiph.com comp.lang.python:76392

Show key headers only | View raw


In article <lsmeej$49n$1@online.de>,
 Philipp Kraus <philipp.kraus@flashpixx.de> wrote:

> The code works till last week correctly, I don't change the pattern.

OK, so what did you change?  Can you go back to last week's code and 
compare it to what you have now to see what changed?

> My question is, can it be a problem with string encoding? Did I mask 
> the question mark and quotes correctly?

The best thing to do with regular expressions is to use raw strings, 
i.e. r'this is a string'.  The nice thing about that is backslashes are 
not special.  It makes it about 1000% easier to write complicated 
regular expressions.  Simple ones are only 500% easier.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

string encoding regex problem Philipp Kraus <philipp.kraus@flashpixx.de> - 2014-08-16 02:27 +0200
  Re: string encoding regex problem Roy Smith <roy@panix.com> - 2014-08-15 20:48 -0400
    Re: string encoding regex problem Philipp Kraus <philipp.kraus@flashpixx.de> - 2014-08-16 04:08 +0200
      Re: string encoding regex problem Roy Smith <roy@panix.com> - 2014-08-15 22:14 -0400
      Re: string encoding regex problem Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-16 14:35 +1000
      Re: string encoding regex problem Peter Otten <__peter__@web.de> - 2014-08-16 11:01 +0200
        Re: string encoding regex problem Philipp Kraus <philipp.kraus@flashpixx.de> - 2014-08-23 22:46 +0200
          Re: string encoding regex problem Peter Otten <__peter__@web.de> - 2014-08-23 23:13 +0200

csiph-web