Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python RegEx re.compile() Set class [s,.] will match any whitespace character ‘,’ or ‘.’

import re

# d is equivalent to [0-9].
p = re.compile('d')
print(p.findall("I went to him at 9 A.M. on 5th March 1999"))

# d+ will match a group on [0-9], group
# of one or greater size
p = re.compile('d+')
print(p.findall("I went to him at 9 A.M. on 5th July 1999"))
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Python #RegEx #Set #class #match #whitespace #character
ADD COMMENT
Topic
Name
2+4 =