Moved to a handcrafted function instead of using regex.
This way the Visual C++ Ninja only preset can be processed.
Change-Id: I9b303ee1765db05544d81db7d3b8d9e5223f5f42
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>