Python正则表达式

1.    在Python中,主要使用_______模块来实现正则表达式的操作。

2.    以下的正则表达式哪一个可以并仅可以正确匹配python,jython和cython?

A. [P,J,C]ython              B.[pjc]ython

B. [a-z]ython                D.[^pjc]ython

3.    请写出一个字符串变量为type,要求它能正确匹配百度网址(http://www.baidu.com或 www.baidu.com 或 baidu.com)的正则表达式

4.    Python的re模块中________方法能在整个字符串中寻找模式,__________方法能从字符串的开始出匹配模式.

5.    将字符串”tina gray, joy;tom;  mari”中所有的人名解析出来存放到一个列表中

6.    请统计出下面这段话中包括多少词,并分别列出是什么。将所有的单独出现的i替换为I

Super Mom 

Mom, you're a wonderful mother, So gentle,yet so strong. The many ways you show you care Always make me feel Ibelong.  You're patient when I'm foolish;You give guidance when i ask; It seems you can do most anything; You're themaster of every task.  You're adependable source of comfort; You're my cushion when I fall. You help in timesof trouble; You support me whenever i call. i love you more than you know; You have my total respect. If I had mychoice of mothers, You'd be the one I'd select!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值