mirror of
https://github.com/rasbt/python_reference.git
synced 2025-03-29 17:06:47 +00:00
added more overview
This commit is contained in:
parent
0a4b19311e
commit
54b60c7673
@ -8,14 +8,19 @@ import re
|
|||||||
'+' matches all characters that follow (1 or more)
|
'+' matches all characters that follow (1 or more)
|
||||||
'?' makes the previous character optional
|
'?' makes the previous character optional
|
||||||
'{4}' previous character must match exactly 4 times
|
'{4}' previous character must match exactly 4 times
|
||||||
<<<<<<< HEAD
|
|
||||||
'{2-4}' previous character must match exactly 2-4 times
|
'{2-4}' previous character must match exactly 2-4 times
|
||||||
'[0-9]' matches all characters in the set of numbers 0 to 9
|
'[0-9]' matches all characters in the set of numbers 0 to 9
|
||||||
'[A-Z]' matches all characters in the set of A to Z
|
'[A-Z]' matches all characters in the set of A to Z
|
||||||
|
'\d' matches all digits, e.g., '4', '9' ...
|
||||||
|
'\D' matches all NON-digit characters
|
||||||
|
'\s' matches all space characters: '', '\t', '\r', '\n'
|
||||||
|
'\S' matches all NON-space characters
|
||||||
|
'\w' matches all non-punctuation characters (i.e., letters and digits)
|
||||||
|
'\W' matches all NON-letter and NON-digit characters
|
||||||
|
'^bla' NOT-matches 'bla'
|
||||||
|
'let$' matches 'let' but not 'letter'
|
||||||
|
'\b' matches transition between non-word characters and word characters
|
||||||
|
|
||||||
=======
|
|
||||||
'{2-4}' previous character must match exactly 2-4 times
|
|
||||||
>>>>>>> 27283e2422d4773456419bf7cb8ee6845a54aff6
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
data = '''2013-01-01
|
data = '''2013-01-01
|
||||||
|
Loading…
x
Reference in New Issue
Block a user