Python论坛  - 讨论区

标题:Re: RE: [python-chinese] python中怎么实现sed的功能

2005年04月06日 星期三 11:25

逸飞 张 yancy_zhang at yahoo.com.cn
Wed Apr 6 11:25:06 HKT 2005

使用re.S把问题解决了,谢谢大家的指点。

lifr <lifr_sh at yeah.net> wrote:may be you should consider the two flag:

from manual of re module

M 
MULTILINE
When specified, the pattern character "^" matches at the beginning of
the string and at the beginning of each line (immediately following each
newline); and the pattern character "$" matches at the end of the string
and at the end of each line (immediately preceding each newline). By
default, "^" matches only at the beginning of the string, and "$" only
at the end of the string and immediately before the newline (if any) at
the end of the string. 

S 
DOTALL
Make the "." special character match any character at all, including a
newline; without this flag, "." will match anything except a newline.

anyway, if you cannot get it done by yourself, you can put it in the
mail-list, and we can help you.

-----Original Message-----
From: python-chinese-bounces at lists.python.cn
[mailto:python-chinese-bounces at lists.python.cn] On Behalf Of 逸飞 张
Sent: Tuesday, April 05, 2005 10:31 PM
To: python-chinese at lists.python.cn
Subject: Re: [python-chinese] python中怎么实现sed的功能


使用了一下,感觉不错。
但还是不知道怎么完成多行匹配,即要匹配的模式可能在一行上也可能在多行上,
而且分行的位置不是很确定。
--- Jacob Fan wrote:
> 请看re模块的文档, 其中module content一节.
> 逸飞 张 wrote:
> 
> >
>
有相关的module还是使用re模块,替换之类的功能怎么实现。
> > 请举个例子,谢谢。
> 
> 
> _______________________________________________
> python-chinese list
> python-chinese at lists.python.cn
> http://python.cn/mailman/listinfo/python-chinese
> 

_________________________________________________________
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
http://music.yisou.com/
美女明星应有尽有,搜遍美图、艳图和酷图
http://image.yisou.com
1G就是1000兆,雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/ma
il_1g/
_______________________________________________
python-chinese list
python-chinese at lists.python.cn
http://python.cn/mailman/listinfo/python-chinese



_______________________________________________
python-chinese list
python-chinese at lists.python.cn
http://python.cn/mailman/listinfo/python-chinese




---------------------------------
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
美女明星应有尽有,搜遍美图、艳图和酷图
1G就是1000兆,雅虎电邮自助扩容!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20050406/2342777b/attachment.html

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

2005年04月06日 星期三 12:23

Meaglith Ma meaglith.ma at mypress.com.cn
Wed Apr 6 12:23:33 HKT 2005

请问我怎么把pdf格式转成一个图片格式,bmp,tiff或者jpg格式都可以。









----------------------------------------
欢迎访问我的Blog:
http://spaces.msn.com/members/meaglith/


----------------------------------------
       .--.
      |o_o |
      |:_/ |
     //   \ \
    (|     | )
   /'\_   _/`\
   \___)=(___/
----------------------------------------
沧海笑 滔滔两岸潮 浮沉随浪记今朝 
苍天笑 纷纷世上潮 谁负谁胜天知晓 
江山笑 烟两遥 涛浪淘尽红尘俗也知多少 
竟惹寂寥 一襟晚照 
苍生笑 不再寂寥 豪情仍在痴痴笑笑

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

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

    你的回复:

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

    Zeuux © 2025

    京ICP备05028076号