Check if regex match is carried out successfully

Re: https://github.com/x-team/wp-stream/commit/767f7b27270ba01619b1ada3c552c5f207bc39ce#commitcomment-6280537