469,612 Members | 1,639 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,612 developers. It's quick & easy.

best approach to extract from long string tables and other info

GS
I need to extract sections out of a long string of about 5 to 10 KB, change
any date format of dd Mmm yyyy to yyyy-mm-dd, then further from each section
extract columns of tables.
what is the best approach in using regex for this? I can see match and
replace the dates, extract section with regex, and then for each section
extract again with the right regex the tables....


Mar 19 '08 #1
1 1464
On Mar 19, 5:47 am, "GS" <gsmsnews.microsoft.co...@msnews.Nomail.com>
wrote:
I need to extract sections out of a long string of about 5 to 10 KB, change
any date format of dd Mmm yyyy to yyyy-mm-dd, then further from each section
extract columns of tables.

what is the best approach in using regex for this? I can see match and
replace the dates, extract section with regex, and then for each section
extract again with the right regex the tables....
Besides from Regex, you might be able to use a LINQ query to parse the
string (if you're using the 3.0 or greater framework). I've only
started to play around with LINQ, but I know Jon Skeet has written
about how LINQ can have much better performance than Regex, but it
will depend on structure of the string and other things.

Thanks,

Seth Rowe [MVP]
Mar 19 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

136 posts views Thread by Matt Kruse | last post: by
10 posts views Thread by Rich Wallace | last post: by
1 post views Thread by sj | last post: by
29 posts views Thread by gs | last post: by
5 posts views Thread by deko | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.