From: anon1m0us Date: 2007-02-08T00:05:06+09:00 Subject: Match until new line I am running a server utility that allows me to view server shares and permissions. The command I am using is: SHARES=Array.new SHARES=`srvcheck \\\\testserver.split("\n") This will change to be a variable. the output is: \\testserver1\test domain\user1 Full Control Domain\Admin Full Control Domain\chuser Read Everyone Read domain\ysergeb Read \\testserver2\BACKUPTEST Everyone Change BUILTIN\Administrators Read \\testserver31\DEVQA$ Everyone Full Control \\testsercver4\trymeout$ BUILTIN\Administrators Full Control I need to match to a server and a specified share and print out all the permissions just for that share. The .split("\n") spliuts it on the newline, but how can I get all the information in between the new lines. I need \\testserver2 with all it's permissions and ignore the rest.