Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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 www.kite.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
1+6 =