c# - String Matching
i'm using a code to search number of strings and match them with one string.

my code:
            foreach (string needle in list)
            {
                if (Regex.IsMatch(haystack,needle))
                {
                    //do some stuff
                }
            }

is there any way to speedup the matching process? thanks
c# - String Matching
===

i'm using a code to search number of strings and match them with one string.

my code:
            foreach (string needle in list)
            {
                if (Regex.IsMatch(haystack,needle))
                {
                    //do some stuff
                }
            }

is there any way to speedup the matching process? thanks