Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

re.sub

re.sub(pattern,replacement,string)
re.sub finds all matches of pattern in string and replaces them
with replacement.
#Example
re.sub("[^0-9]","","abcd1234") #Returns 1234
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+3 =