[wpkg-users] Conditional depends?
Anthony Walters
anthony.walters at dkit.ie
Fri Jan 11 16:31:53 CET 2019
> OK, but there's no match form 'minor/major of', nor negations.
>
> So, if i need to match 'before windows 10' i can use:
>
> os=" \d{1}\.\d{1}\.\d{4}"
>
> (note the space in front of the first number), eg 'all version numbers
> that start with a single digit', but this seems to me a bit kludgy/too loose.
>
>
> There's some way to write a stricter matches?
>
You could make the matching of the space more readable and obvious in
your code like so:
os="\s+\d{1}\.\d{1}\.\d{4}"
And to expand on that, this only matches windows versions 7, 8 and 9.
os="\s+[789]{1}\.\d{1}\.\d{4}"
Is there *always* a space before the 'os' string? if so that's good
enough i think.
--
Anthony Walters
Technical Officer
Dundalk Institute of Technology
Ext: 2151
Tel: 042 9370200
More information about the wpkg-users
mailing list