Function build_regex
Source pub fn build_regex(pattern: &str) -> Result<Regex, String>
Expand description
Compiles a regular expression from the given pattern string.
§Arguments
pattern
- A string slice that holds the regex pattern to compile.
§Returns
Ok(Regex)
if the pattern is valid.
Err(String)
with a detailed error message including the JUNO_ERROR_INVALID_REGEX
constant if compilation fails.