Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / March 2008

Tip: Looking for answers? Try searching our database.

best approach to extract from long string tables and other info

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GS - 19 Mar 2008 09:50 GMT
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....
rowe_newsgroups - 19 Mar 2008 12:29 GMT
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
[quoted text clipped - 3 lines]
> 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]
GS - 19 Mar 2008 17:40 GMT
thanks
With linq can I still use table driven approach?

that is can LINQ query be stored in table and retrieved dynamically to use?
There is this requirement that the parse logic be table driven so that the
entire app does not need to compiled  every time when parse logic change.
Consequently the app is more adaptable to different user needs  and external
change without massive version of hardwired code support.

The targets are at least Athlon 64 +3800  2 GHz if not Core 2 2.2 GHz.
Users are happy to put up with 2 or 3 seconds processing time as it would
take an user quite  a few minutes of copy, paste, edit, import

> On Mar 19, 5:47 am, "GS" <gsmsnews.microsoft.co...@msnews.Nomail.com>
> wrote:
[quoted text clipped - 15 lines]
>
> Seth Rowe [MVP]

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.