fn parse_pattern(pattern_str: &str) -> Result<Vec<PatternElement>, SsrError>Expand description
Returns pattern_str, parsed as a search or replace pattern. If remove_whitespace is true,
then any whitespace tokens will be removed, which we do for the search pattern, but not for the
replace pattern.