looking for a regular expression

Tim Roberts timr at probo.com
Thu Aug 3 23:43:10 EDT 2006


shadowcaster.bbs at bbs.wretch.cc (¨ì©³¦b²Ö¤°»ò°Ú¡H) wrote:
>
>¡° ¤Þ­z¡m__peter__ at web.de (Peter Otten)¡n¤§»Ê¨¥¡G
>> ¨ì©³¦b²Ö¤°»ò°Ú¡H wrote:
>> > Thanks a lot! I have never thought of that.
>> > But what if there's not only commas, but also periods and semicolons? I
>> > want to find words between 2 near by punctuations. I think it would make
>> > it difficult to use split instead of regular expression.
>> Reenter re. Use
>> re.split(r"[.;\-,]", my_string)
>> instead of my_string.split(",").
>> Peter
>
>Thank you for your help.
>--
>¤Ò§LªÌ¤£²»¤§¾¹ª«©Î´c¤§¬G¦³¹DªÌ¤£³B§g¤l©~«h¶Q¥ª¥Î§L«h¶Q¥k§LªÌ¤£²»¤§¾¹«D§g¤l
>¤§¾¹¤£±o¤w¦Ó¥Î¤§«ï²H¬°¤W³Ó¦Ó¤£¬ü¦Ó¬ü¤§ªÌ¬O¼Ö±þ¤H¤Ò¼Ö±þ¤HªÌ«h¤£¥i±o§Ó©ó¤Ñ¤U
>¨o¦N¨Æ©|¥ª¤¿¨Æ©|¥k°¾±N­x©~¥ª¤W±N­x©~¥k¨¥¥H³à§³B¤§±þ¤H¤§²³¥H«s´dª_¤§¾Ô³Ó¥H
>³à§³B¤§¹D±`µL¦W¾ëÁö¤p¤Ñ¤U²ö¯à¦Ú«J¤ý­Y¯à¦u¤§¸Uª«±N¦Û»«¤Ñ¦a¬Û¦X¥H­°¥ÌÅS¥Á²ö
>¤§¥O¦Ó¦Û§¡©l¨î¦³¦W¦W¥ç¬J¦³¤Ò¥ç±Nª¾210-64-83-167.adsl.dynamic.seed.net.tw®ü

What is your signature supposed to be?  It looks like you are trying to
inject ANSI terminal escape sequences.  The vast majority of Usenet
participants are now reading these articles through GUI newsreaders or
web-based readers which show this as 5 lines of unrecognizable line noise.
-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list