Newbie question on Re module

Josh mlsj at earthlink.net
Tue Dec 31 13:52:17 EST 2002


Josh <mlsj at earthlink.net> wrote in
news:Xns92F5826AE2F65jslmAAearthlinknet at 130.133.1.4: 

> I am trying to strip out all binaries groups from a list of
> newsgroups. Basically I wanted to write a regular expression that
> would match all non binaries groups. But this does not seem to work:
> rgx=re.compile('[^(binaries)]'). My question is why not? How else
> would I write the regex? I am a newbie at Regexes so please be kind:)
> 
> Josh
> 

 I know I can match all binaries groups and then remove them from the list. 
My question is how can I do it the other way round, meaning how can I match 
all non binaries groups in the first place.



More information about the Python-list mailing list