pub fn build_regex(regex: &str) -> Result<FsmWithStartEnd, String>
Parse regex and build its NFA.
regex