REGEX an array of strings -
02-01-2011
, 04:02 AM
Hi Everyone,
I am wondering if there is a 'shortcut' when using regular expressions
on an array of strings. I have an array with about 5000 elements, and
I want to strip out a certain section of each string and ditch the
rest. I figured that since regex is so fast and good a doing this it
would be the way to go. I am just wondering if there is a way to pass
the entire array to regex and process it in a single hit rather than
loop through the elements one at a time. In theory I will get back an
array with 5000 elements that have been 'cleaned' by regex.
Currently I am only aware of the regex.Execute(<string>) method. Is
there also one for an array? Is there a location I can find some
decent documentation on this? I get lots of hits with google but most
of it is junk (so far).
Any pointers appreciated.
Cheers
The Frog |