I am using the RE, Regular Expression Module. The operation I need to perform is a search; The syntax for which goes like this
re.search(pattern, string, flags) #flags being optional
where 'pattern' is the string I am looking for in 'string'. My problem is I want to look for pattern and subpatterns in 'string'.
for example. if the pattern I am searching for is
"abcd_asdf" and the string in which I am searching is " aaslkdfn_abcd_asdf_asgd"
I also want to search for "abcd" and "asdf" and "_" individually. The way i understand it is if I explicitly mention each pattern only then I am able to accomplish the task. But if the pattern is specified like
m = "abcd_asdf" then I am not able to do the above mentioned task.
I hope I am not confusing neone. just to clarify a bit more here is the list of patterns and strings. They are in CSV format and I am using the CSV module as well.
Any help will be appreciated.
Sand Trap EVDO
South Valley EVDO