I tend to do most of my work in Perl, so regex and parsing is second nature,
the scripts are small and the speed of execution (of my scripts) is usually
across a network to end hosts, so that is usually the performance bottle
neck and not the code performance. The cost effective was just a flippant
remark and the code posted did not speak to the exact issue the poster
asked. I figured sample code or suggestions would be more appropriate then
giving the solution so the poster can use what works best for them or that
with which they are familiar. I will be more accurate in the future.
Thanks for the time trials that was interesting to see those results.
What I like about the discussion groups is that users of various levels can
get insight into different solutions and the background of those solutions.
I posted some solutions that were criticized and then posted the VB DLL as
that is where I first ran across IsNumeric.
Thanks for your input Jon!
Denis
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...
Denis Dougall wrote: Using Regular expressions is the most cost effective way.
What exactly due you mean by "cost effective" here? It certainly isn't
the cheapest way of working - it's fairly easy to write a hard-coded
check which is many times quicker than a regular expression.
Using a regular expression is more efficient than using a try/catch,
but arguably harder to read/debug. (It depends on your level of regex
ability.)
Jon