For someone unknown reasons, I am unable to retrieve this variable on Windows batch file.
PowerShell:
$datePattern = [Regex]::new(\'value=(\\S+)\')
$
I'm not quite sure what exactly it is you want to get from the regex, but in your code you are re-defining the $datePattern immediately after setting it to value=(\S+).
With \S+ you seem to not care about the format of the value, as long as it is something that is not whitespace.
In the second definition of the regex, you DO want the value to be exactly two digits followed by a dot and then another digit.
If that exact number format is what you seek, just do
$datePattern = [Regex]::new('value=(\d\d\.\d)')
When executed with
$m = $datePattern.Matches("/ start=2010 / height=1 / value=12.2 / length=0.60 / users=264 / best=Adam /")
you will have $m.Value which results in value=12.2
and $m.Groups[1].Value which gives you the result of 12.2
If you are looking for a numeric value but do not know the exact format, better change the regex to something like this: 'value=(\d+.\d+)'