Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

array search with regex python

import re

mylist = ["dog", "cat", "wildcat", "thundercat", "cow", "hooo"]
r = re.compile(".*cat")
newlist = list(filter(r.match, mylist)) # Read Note
print(newlist)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #array #search #regex #python
ADD COMMENT
Topic
Name
1+1 =