[Oval-devel] [Oval-commits] r71 - trunk/tools/oval/parser

Pavel Vinogradov blaze-cs at udm.net
Thu Jul 12 07:10:33 UTC 2007


В Срд, 11/07/2007 в 19:09 +0200, Javier Fernández-Sanguino Peña пишет: 
> I actually think you should simplify the URL Regexp and leave it like this:
> 
> urlpatern = re.compile (r'fileurl [\w:/.]+/([^/]*?)\.deb')
> 
> Wouldn't that be better?
  This regexp not good, because:
>>> urlpatern = re.compile (r'fileurl [\w:/.]+/([^/]*?)\.deb')
>>> print urlpatern.search ("<fileurl
http://security.debian.org/dists/stable/updates/main/binary-alpha/gzip_1.2.4-33.1_alpha.deb>").groups()
('security',)

/security.deb also satisfy this regexp. 

  My latest version of regexp works for me:
urlpatern = re.compile (r'fileurl [\w:/.\-+]+/([\w\-.+]+)\.deb[^i]')




More information about the Oval-devel mailing list