How can an and operator be emulated in regular expressions in Python?
Specifically, I want to return a match on a string if and only if 2 or more
substrings all appear in the string.  For example, for a string s = 'Jones
John' and substrings sg0 = 'Jones' and sg1 = 'John', I want to return a
match, but for substrings sg0 = 'Jones' and sg2 = 'Frank' I do not want to
return a match.  Because the expression 'A and B' is logically equivalent to
'not (not A or not B)' I thought I could try something along those lines,
but can't crack it.

Ross


<<attachment: winmail.dat>>

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to