Python论坛  - 讨论区

标题:[python-chinese] 正 规 表 现 中 书 名 号 的 问 题 。

2004年03月12日 星期五 08:41

Anthony Liu antonyliu2002 at yahoo.com
Fri Mar 12 08:41:08 HKT 2004

I want to split a long sentence, using the
punctuations as the delimitors like so:

clauses =
re.split(r',|,|。|:|》|《|“|”|!|、|;|;
|\(|\)| |\(|\)|\?', chunks[i])

I have problem with the book title mark
《》, whenever I use it in the regular
expression above, I will have problem even if I don't
have the book title mark in the input sentence.

If I remove the book mark title from the regular
expression, then it works fine.

Any idea?

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2024

    京ICP备05028076号