Hi

On 05.04.2017 09:08, margaus M. wrote:
> Hello Team!
> 
> I am in trouble with regular expressions. The thing is that I want to know
> if the FW version I am obtaining in each case is lower or equal to 3.0.53.
> For this I have tried this regular expression:
> 
> ^([0-2]\.|3\.0\.([0-9]\Z|[0-4][0-9]\Z|5[0-3]\Z))
> 
> 
> I am evaluating this with th help o this web site: https://regex101.com/
> 
> Once I try it in OpenVAS it doesn't work. Could anybody help me to find the
> reason why and to make a regular expression which does it?
> Thank you very much for your help.

you don't need to use any regex for this task. Have a look at the
version_* functions (e.g. version_is_less_equal() ) of version_func.inc
which is exactly doing what you're looking for.

Regards,

-- 

Christian Fischer | PGP Key: 0x54F3CE5B76C597AD
Greenbone Networks GmbH | http://greenbone.net
Neumarkt 12, 49074 Osnabrück, Germany | AG Osnabrück, HR B 202460
Geschäftsführer: Lukas Grunwald, Dr. Jan-Oliver Wagner
_______________________________________________
Openvas-plugins mailing list
Openvas-plugins@wald.intevation.org
https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-plugins

Reply via email to