Viv Singh wrote:Isnt there any way to read till the end of line?
Because the problem is that I do not know the exact data. There could be many variations Like Windows 2000 Service Pack 1, Windows 2000 Service Pack 2, Windows XP Service Pack 1, Windows 98 ............
Sure, you can change your match criteria to everything but the carriage return / line feed, and it will match to the end of line. Or you can read it a line at a time, then match everything, which is to the end of line.
However, in your example...
Windows Vista 32-bit Service Pack 1 abcdef
It wasn't separated by an EOL -- in this case, how do you know if abcdef isn't part of the OS name?
Henry