The more, the merrier! Login and vote now.
By bloid
via eggheadcafe.com
Submitted: May 13 2008 / 05:46
This is a question that apparently comes up frequently: What is the fastest way to search a string of text for a bunch of keywords (e.g., a "badwords" list for cleaning or disallowing forum spam, etc.). To the average developer, two approaches come to mind: First, the "brute force" String.IndexOf method. Second, using REGEX to find matches based on an OR (x|y|z..) expression.
Add your comment