I'm not very good with regex and i've been kinda scratching my head on this one. I got the following php code using preg_match which is supposed to match all characters in the registry pathing except for the record number... which in this case is "record??]":
<?php
$reg_section = "[HKEY_LOCAL_MACHIN\SOFTWARE\INTERSTAR TECHNOLOGIES\XMEDIUS\CONFIG MANAGER\SYSTEM\COMPANIES\RECORD11]";
$pattern = "/^(\[HKEY_LOCAL_MACHIN\\\SOFTWARE\\\INTERSTAR TECHNOLOGIES\\\XMEDIUS\\\CONFIG MANAGER\\\SYSTEM\\\COMPANIES\\\RECORD(\d+)\])$/";
if ( preg_match($pattern, $reg_section )) {
echo "Found";
} else {
echo "not found";
}
?>
The error I get is:
Parse error: syntax error, unexpected T_IF in C:\Inetpub\wwwroot\xfax\regmatch.php on line
5
thanks in advance