Regex question
-
In general when I know exactly the keywords(about 300) I want to find should I use something like: 1)Regex(@"if|do|for|while|int|Int32|Int64...(about 300)") or 2)Regex(@"[_A-Za-z]+[A-Za-z]\w*] and follows searching in a hashtable?
Option 2 would be preferable, speed and maintainability are the biggest benefits. Option 1 is simply out of the question. That's just a nightmare waiting to bite you. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
In general when I know exactly the keywords(about 300) I want to find should I use something like: 1)Regex(@"if|do|for|while|int|Int32|Int64...(about 300)") or 2)Regex(@"[_A-Za-z]+[A-Za-z]\w*] and follows searching in a hashtable?
I tried to paste a single Regex solution using groups, but the post somehow crashed the forum..:^) xacc-ide 0.0.12 now with C#, MSIL, C, XML, ASP.NET and HLSL coloring - Screenshots