I'm definitely not a regex master, but what's the *[=.]?* part required for ?
On Tuesday, November 13, 2012 7:00:32 PM UTC+1, Jonathan Lundell wrote: > > On 13 Nov 2012, at 9:04 AM, Niphlod <nip...@gmail.com <javascript:>> > wrote: > > seems a problem with the default regex checking for args.... Let's wait > for Jonathan > > >>> import re > >>> mymatch = re.compile(r'([\w@ -]+[=.]?)*$') > >>> mymatch.match('a') > <_sre.SRE_Match object at 0x02A61020> > >>> mymatch.match('Abbbbbbbb Lccc - Pddddddd GA Deeeeee (ffff ffff A).pdf') > > endless loop of backtracing regex > > > I don't have a quick fix. The easy solutions involve re elements not > available in Python re (or at least not until 3.1). > > A workaround would be to make the pattern a little more lenient: [\w@ -=.]+ > > If we really want to exclude successive dots or equals, we could make a > separate check for that. > --