【python】 string.puntuation符号匹配原则
来源:互联网 发布:模拟电路软件汉化版 编辑:程序博客网 时间:2024/05/18 22:18
由于在使用的时候发现字符串中有些标点被比配,有些则没有被匹配,搜了一下没有找到具体解释,下面就发一些自己测试的结果仅供参考。
#!usr/bin/env python#-*-coding:utf-8-*-import stringimport restring1='(3.6.3)fadssa.7/4.'string2='hello/2017-19-29...//'string3='hello./.,;'print(string1.strip(string.punctuation))print(string2.strip(string.punctuation))print(string3.strip(string.punctuation))
输出结果如下:(3.6.3fadssa.7/4hello/2017-19-29hello
阅读全文
0 0
- 【python】 string.puntuation符号匹配原则
- 符号匹配
- 符号匹配
- python匹配文本中全角符号的两种方法
- 符号匹配函数
- 数据结构_符号匹配
- 正则表达式:匹配符号
- java 正则匹配符号
- 常用正则匹配符号
- 常用正则匹配符号
- 符号匹配问题
- URLPath匹配原则
- Ant path 匹配原则
- Ant path 匹配原则
- Ant path 匹配原则
- IntentFilter的匹配原则
- springMvc路径匹配原则
- java异常匹配原则
- 利用Dom4j 解析XML文件
- linux c编程操作数据库(sqlite3应用)
- LeetCode_24_Swap Nodes in Pairs
- Android 开发资料便签
- 我如何在5台虚拟机上整合hadoop生态圈的各种组件(随笔)
- 【python】 string.puntuation符号匹配原则
- Why Stackable Switches Are More Favored?
- Runloop 探秘(二)—— NSTimer 计时不准?
- CentOS7安装Maven编译pom所出的异常
- 欢迎使用CSDN-markdown编辑器
- C++编译的若干问题
- Java学习小结
- 服务器常用的状态码
- SpringMVC如何绑定数据,绑定完数据之后如何确保我们得到的数据的正确性