in reply to differnce between egrep and perl regex ?
If you want speed then forking for each of 700 egreps isn't good, of course. Depending on complexity of your rexegps you can or cannot just use some DFA to NFA conversion tool. So probably manual conversion of all regexes worth it, especially if new regexps are added too seldom, as I understood from your post.
As for longest match, just reorder alternations from longest to shortest. Also, in MRE there's an example of finding rightmost longest match, maybe you will find that useful.
|
|---|