Hi Marcus,

This does not sound right. Some distributions add stuff ad the end,
typically the distribution name. I dunnot if that is an issue on windows as
well. What I do know is that for instance development versions of re2c add
'.dev' here. Also note that re2c is one of the tools that provide a way
easier way to check the version number. That is you call it using either
'-V' or '--vernum' which gives you back an integer number which can be
checked easier.

var version = "1.2.3.dev";
var result = test(version);

function test(version) {
if (version.match(/(\d+\.\d+\.\d+(\.\d+)?)/)) {
 return RegExp.$1;

WScript.StdOut.WriteLine("result was " + result);

//result was 1.2.3

Same result for 1.2.3-dev.

- Steph

PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to