S
Stefan
Starting with:
$a = '1.1.2';
$b = '1.1.10';
Is there an elegant, one-liner way -- possibly using RE -- to yield:
$a = '2';
$b = '10';
In other words, strip out the beginning equal portion of 2 strings?
Moreover, how could you compare the original $a and $b such that $b >
$a (as in version comparisons)?
Thanks!
Stefan
$a = '1.1.2';
$b = '1.1.10';
Is there an elegant, one-liner way -- possibly using RE -- to yield:
$a = '2';
$b = '10';
In other words, strip out the beginning equal portion of 2 strings?
Moreover, how could you compare the original $a and $b such that $b >
$a (as in version comparisons)?
Thanks!
Stefan