Dylan Moreland wrote: > So I would try something like: > > pat = re.compile(r" (?:AND|OR|AND NOT) ") > pat.split(string)
footnote: this yields:
['Smith, R.', 'White', 'Blue, T.', 'Black', 'Red', 'NOT Green']
(the | operator picks the first (leftmost) alternative that results in an
overall match.)
</F>
--
http://mail.python.org/mailman/listinfo/python-list
