T:
> I meant to say:  Search for any character in r'/\:*?"<>|' in a string

You don't need a RE to solve such problem. There are many ways to solve
it, this is one of the simpler (Python 2.4+):

>>> chars = set(r'/\:*?"<>|')
>>> s1 = "is this a sample string?"
>>> bool( set(s1) & chars )
True
>>> s2 = "this is a sample"
>>> set(s2).intersection(r'/\:*?"<>|')
set([])

Bye,
bearophile

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

Reply via email to