in reply to Re^2: Reg Exp
in thread Reg Exp

Actually, IFF (if and only if) there are only the 2 variations presented in the OP, you could just use a

@arr=split(/ /,$test);

... and count the size of the array

$size=scalar(@arr);

if its 4, arr[2]is the OS, otherwise no OS was specified