stateReplaceField properly escaped fieldName before building the regex, but stateExtractField did not. Field names containing regex metacharacters could cause incorrect matches or regex errors. Co-authored-by: Ethan Hurst <ethan.hurst@outlook.com.au>