Livecheck regex syntax
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi, I'm working at the livecheck of some packages at the moment and I have a question about the regex to use. I think I have to options (here an example) to specify the version part of the regex: 1. livecheck.regex "${name}(.+?) " 2. livecheck.regex "${name}(${version}) " Should I prefer one of these options or it's just my choice and none is better then the other. Thanks for your help, Simon - -- + privacy is necessary + using http://gnupg.org + public key id: 0x6115F804EFB33229 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFGwxfGYRX4BO+zMikRClB0AJ0d4K3Kf+xPNLliF+bwJEE+1hGwCgCglNra T9zYt35L0TpH/AoDFsTCoAI= =DdW7 -----END PGP SIGNATURE-----
Le 15 août 07 à 17:12, Simon Ruderich a écrit :
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Hi,
I'm working at the livecheck of some packages at the moment and I have a question about the regex to use. I think I have to options (here an example) to specify the version part of the regex:
1. livecheck.regex "${name}(.+?) " 2. livecheck.regex "${name}(${version}) "
Should I prefer one of these options or it's just my choice and none is better then the other.
Thanks for your help, Simon
${version} is not a pattern, your thing will be ${name}4.3 for example. So if the newest version available, the regex will not match and port will be unable to tell the user a new version is available or not. I try to as precise as possible in my livechecks, with something like: (\d+(?:\.\d+)*) Regards, -- Anthony Ramine, the infamous MacPorts Trac slave. nox@macports.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 N_Ox wrote:
${version} is not a pattern, your thing will be ${name}4.3 for example. So if the newest version available, the regex will not match and port will be unable to tell the user a new version is available or not.
I try to as precise as possible in my livechecks, with something like: (\d+(?:\.\d+)*)
Regards,
-- Anthony Ramine, the infamous MacPorts Trac slave. nox@macports.org
You are right, of course. Stupid of me not to consider that the regex doesn't match when there is a different version. Thanks for the hint ;-) Simon - -- + privacy is necessary + using http://gnupg.org + public key id: 0x6115F804EFB33229 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFGw1RkYRX4BO+zMikRCoK7AKDAa1nYzFUAWq8k3b6c1TJW0Y0znQCgi5Kv GlUiq/2O6lUr/5HU60cvnEY= =J9Xj -----END PGP SIGNATURE-----
participants (2)
-
N_Ox
-
Simon Ruderich