From: Joachim Protze <joachim.protze@tu-dresden.de>
To: Paul_Koning@Dell.com
Cc: graham.labdon@avalonsciences.com, gdb@sourceware.org
Subject: Re: help with pretty printing
Date: Mon, 25 Jun 2012 11:05:00 -0000 [thread overview]
Message-ID: <4FE845D0.5070505@tu-dresden.de> (raw)
In-Reply-To: <D7A359B3-DDB9-4AD9-A136-072CDC18B155@dell.com>
[-- Attachment #1: Type: text/plain, Size: 1319 bytes --]
Hi,
On 07.06.2012 20:26, Paul_Koning@Dell.com wrote:
> Yes, but since you're dealing with a regular (not raw) string here, the \ needs to be doubled, otherwise it is treated as a string character escape instead of a backslash character inside the string. So one of these will match space followed by asterisk:
your post let me wonder, why my code worked for me and I asked the
python interpreter for his opinion:
>>> '^QFile (
\*)?$'
'^QFile (
\\*)?$'
>>> '^QFile (
\\*)?$'
'^QFile (
\\*)?$'
>>> r'^QFile (
\*)?$'
'^QFile ( \\*)?$'
Equal output for all versions of these strings and for python versions
2.4, 2.6, 2.7 and 3.2 (the versions I found on severals machines).
- Joachim
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5319 bytes --]
prev parent reply other threads:[~2012-06-25 11:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-01 9:07 somersetgraham
2012-06-02 5:28 ` Niko Sams
2012-06-02 10:29 ` xgsa
2012-06-02 11:10 ` Niko Sams
2012-06-02 11:24 ` xgsa
2012-06-07 7:42 ` Joachim Protze
2012-06-07 18:27 ` Paul_Koning
2012-06-25 11:05 ` Joachim Protze [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FE845D0.5070505@tu-dresden.de \
--to=joachim.protze@tu-dresden.de \
--cc=Paul_Koning@Dell.com \
--cc=gdb@sourceware.org \
--cc=graham.labdon@avalonsciences.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).