There are various projects that combine multiple regexps into a single DFA. Have a look at https://github.com/proebsting/re
On Wednesday, 2 September 2020 21:23:40 UTC+1, Brian Candler wrote: > > Can you define the problem more clearly? > > It looks like you just want to replace a leading "9", "001" or "+1" with > "1"? In that case, you just match ^(9|001|[+]1) and replace it with 1 > > If that's not what you want, then what are the exact rules for how the > input needs to be changed? > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/aa97e42f-3b8f-4c4b-93dd-5c0ec2067c20o%40googlegroups.com.