Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get pattern from string python

How to get substring in string 
import re
def count_substring(string, sub_string):
    result = [(_.start(), _.end()) for _ in re.finditer(sub_string, string)]
    
    return len(result[0])
 
PREVIOUS NEXT
Tagged: #pattern #string #python
ADD COMMENT
Topic
Name
2+7 =