MoshiachNow
IS-IT--Management
HI,
Got a file that contains lines like :
[HKEY_LOCAL_MACHINE\Software\Creo\Araxi\Settings\Default\DASS\Services\Ceps_1]
"Model"="CEPSConversion"
"Host"="YCS90317-9825"
"Features"="44;43"
"Installed"=dword:00000001
"Pool"=dword:00000000
"Offline"=dword:00000000
In code I search for lines that contain "Host"=" nad try establishing the host name that follows.
Whatever regexes I try - both print expressions print nothing,seemingly not finding the string:
open (FILE,'Araxi.reg') || die "Could not open Araxi.reg: $!";
while (<FILE>) {
chomp;
if ($_ =~ /\"Host\"=\"/) {
print "$_\n";
($NEWNAME) = m/\"Host\"=\"(\w*?)\"/;
print "NEWNAME=$NEWNAME\n";
last;
}
}
Any ideas ?
Thanks
Long live king Moshiach !
Got a file that contains lines like :
[HKEY_LOCAL_MACHINE\Software\Creo\Araxi\Settings\Default\DASS\Services\Ceps_1]
"Model"="CEPSConversion"
"Host"="YCS90317-9825"
"Features"="44;43"
"Installed"=dword:00000001
"Pool"=dword:00000000
"Offline"=dword:00000000
In code I search for lines that contain "Host"=" nad try establishing the host name that follows.
Whatever regexes I try - both print expressions print nothing,seemingly not finding the string:
open (FILE,'Araxi.reg') || die "Could not open Araxi.reg: $!";
while (<FILE>) {
chomp;
if ($_ =~ /\"Host\"=\"/) {
print "$_\n";
($NEWNAME) = m/\"Host\"=\"(\w*?)\"/;
print "NEWNAME=$NEWNAME\n";
last;
}
}
Any ideas ?
Thanks
Long live king Moshiach !