[Tutor] redemo.py and r'python\.org'
Dick Moores
rdm at rcblue.com
Thu Oct 13 21:51:59 CEST 2005
I've begun to try out redemo.py to test and learn regular expressions. It
doesn't seem to accept Python's raw strings as raw strings, e.g.,
r'python\.org' for matching python.org and nothing else. Am I correct,
or is there something I don't understand here?
BTW redemo.py can be found in Python 2.4 in Tools\Scripts.
BTW2 The new book, _Beginning Python: From Novice to Professional_, by
Magnus Lie Hetland, has 16 pages on the re module, pp. 235-251.
(A question about quoting in a Tutor post: in my 1st paragraph above, how
could I have indicated that I am quoting both
r'python\.org' and python.org
without using quotation marks to do so, so as to not confuse the regex? I
think I remember someone recently using angled brackets. So how about
<r'python\.org'> and <python.org>? Is there a convention about this?)
Thanks,
Dick Moores
More information about the Tutor
mailing list