On Mon, Oct 6, 2008 at 5:37 PM, Deitemeyer, Adam R <[EMAIL PROTECTED]> wrote: > Hello, > > I'm a beginner Python user and I have simple python issue I can't seem to > solve. I want to do a truth test on a string to see if a another string is > contained within it. I found that typically the re module has the methods > to accomplish this. However, every string I'm searching begins with a > metacharacter. For example: if the string '*I need *help' contains the word > 'help' then true, else false..
This would only be an issue with regexes if the pattern you are searching for contained metacharacters. Then you would escape them. But John's approach is simpler in this case. Kent _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
