I have a file containing key/value pairs with on occasional comment (delimited by a ';') that a want to parse with preg_match (or maybe preg_match is the wrong tool).
The file looks like this
key1 VALUE1
key2 VALUE2 ; comment 2
key3 VALUE3a VALUE3b
key4 VALUE4a VALUE4b ; comment 4
preg_match('/\s*(\S+)\s+(.+)/', $line, $result);