Not specific to golang. Incidentally I am using go to develop this 
particular tool.

I have a piece of text that I want to test against a large number of 
regular expressions, where a different action is taken based on which 
regexps successfully
matched. The naive approach is to loop through each regexp and if matches 
do the corresponding action and continue.

I thought of combining all of the regular expressions into one massive 
regexp, and let the regexp state machine do all the discriminating. The 
problem with
this is that it gives you no way to determine which regexps were the matched 
among all.

Any suggestions?


-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to