Sweet! Thanks so much!
--
http://mail.python.org/mailman/listinfo/python-list
unexpected wrote:
> > \b matches the beginning/end of a word (characters a-zA-Z_0-9).
> > So that regex will match e.g. MULTX-FOO but not MULTX-.
> >
>
> So is there a way to get \b to include - ?
No, but you can get the behaviour you want using negative lookaheads.
The following regex is effecti
> \b matches the beginning/end of a word (characters a-zA-Z_0-9).
> So that regex will match e.g. MULTX-FOO but not MULTX-.
>
So is there a way to get \b to include - ?
--
http://mail.python.org/mailman/listinfo/python-list
"unexpected" <[EMAIL PROTECTED]> writes:
> I'm trying to do a whole word pattern match for the term 'MULTX-'
>
> Currently, my regular expression syntax is:
>
> re.search(('^')+(keyword+'\\b')
\b matches the beginning/end of a word (characters a-zA-Z_0-9).
So that regex will match e.g. MULTX-FOO