Return value of std.regex.regex?
问题 I'm trying to write a function that takes an input string, a regex (made by std.regex.regex from a rawstring) and an error message string, and attempt to match something from the input string using the regex, displaying the error message if there are no matches. I came up with the following signature so far: string check_for_match (string input, Regex r, string error_message) However, this doesn't seem to work, as the compiler complains, saying: struct std.regex.Regex(Char) is used as a type