Simplified checks of preg_match results by using default properties.

Removed duplicate vars, use chaining, normalise module name.
This is merely a cleanup-patch. No new features are added.