fix issue 11770  std.regex.Captures should be convertible to bool
Merge pull request #1789 from blackwhale/opcast-regex

fix issue 11770  std.regex.Captures should be convertible to bool