Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get number of occurrences of substring case independent python

import re
_, count = re.subn(r'hello', '', astring, flags=re.I)
print('Found', count, 'occurrences of "hello"')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #number #occurrences #substring #case #independent #python
ADD COMMENT
Topic
Name
9+8 =