"<" special character in re?
Stefan Witzel
stefan.witzel at zvw.uni-goettingen.de
Mon Sep 18 09:29:48 EDT 2000
When I try to extract all characters between "<" and ">" using re ...
import re
hit = re.match('<(?P<i>[a-z]*)>', 'ab<cd>ef')
if hit:
print hit.group('i')
else:
print 'no hit'
... I always get "no hit". Is "<" a special character in re?
Thanks in advance.
Stefan Witzel
--
Stefan Witzel -----------------------------------
Universitaet Goettingen stefan.witzel at zvw.uni-goettingen.de
Stabsstelle DV -----------------------------------
Gosslerstrasse 5-7 fon: +49 551 394160
37073 Goettingen fax: +49 551 399612
Germany -----------------------------------
More information about the Python-list
mailing list