On Mon, May 4, 2009 at 12:38 PM, vince spicer <vinces1...@gmail.com> wrote:
> Advanced Strings searches are Regex via re module.
>
> EX:
>
> import re
>
> m = re.compile("(FDA.*?(approved|
> supported)|Ben[^\s])*")
>
> if m.search(Text):
>     print m.search(Text).group()

This won't match "approved FDA" which may be desired. It also quickly
gets complicated as the search expressions get more complex. Regex
would also have a hard time with something like
"FDA" AND NOT "approved"

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to