Remove redundant costly Kleene stars from regex searches

Some of the string(REGEX MATCH) operations surround the pattern
with ".*", causing the CMake process to effectively wedge when
trying to match on larger (100KiB) bodies of input.

This commit removes those parts without any change in semantics
as MATCH patterns only need to match the actual match.

This should fix bug #1040.