On Sep 4, 6:32 am, AniNair <[EMAIL PROTECTED]> wrote: > hi.. I am trying to match '+ %&/-' etc using regular expression in > expressions like 879+34343. I tried \W+ but it matches only in the > beginning of the string Plz help Thanking you in advance...
You may want to read the page describing the regex syntax a little closer. http://docs.python.org/lib/re-syntax.html \W would match anything but \w. That is, it would match spaces and tabs as well as the weird characters. I don't think that's what you want. Also, don't forget to use raw strings. r"\W+" is preferred over "\W+". -- http://mail.python.org/mailman/listinfo/python-list