Created
September 9, 2015 08:42
-
-
Save hondajojo/09d6a804a2a5a9d1e1b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import re | |
for i in ['w','1','_','\\','+']: | |
if re.search(r"[^\w]",i): #^在[]里 | |
print i | |
# http://www.runoob.com/regexp/regexp-rule.html | |
# [^a-z] //除了小写字母以外的所有字符 | |
# 在[]里 ^表示 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment