473,387 Members | 1,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

tab delimited string (regex'ed) into a table

I have used regex to parse a huge text file, and grab a tab delimited
portion of it. I often use comma delimited text files, and use Jet Oledb4.
I read that I would need an ini if the file wasn't comma delimited - if
this is true, I am not sure of the easiest process to create an ini. The
string has a header.

My string looks like:

"Call" "Date" "Time" "Call Period" "From" "Call Type"
"Number Called" "To" "Call Length" "Local Airtime Rate" "Local
Airtime Charges" "Tax" "LD Charges" "LD Tax" "Additional Call
Charges" "Total"
1 11-Nov 07:23 D OTTAWA ON OG 6158365872 TORONTO ON 3:00 $0.10
$0.30 B $0.00 $0.00 $0.30
2 11-Nov 11:36 D INCOMING IN 6157172119 OAK ON 4:00
$0.10 $0.40 B $0.00 $0.00 $0.40

......
Any ideas on the best way to pull this data into a table or dataset?

Thanks,

Joe
Nov 20 '05 #1
3 2411
* Joe Fisherman <jf********@outdoor--------adventures.com> scripsit:
I have used regex to parse a huge text file, and grab a tab delimited
portion of it. I often use comma delimited text files, and use Jet Oledb4.
I read that I would need an ini if the file wasn't comma delimited - if
this is true, I am not sure of the easiest process to create an ini. The
string has a header.


Have a look at <http://www.connectionstrings.com> -> "Text"...

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
hi***************@gmx.at (Herfried K. Wagner [MVP]) wrote in
* Joe Fisherman <jf********@outdoor--------adventures.com> scripsit:
I have used regex to parse a huge text file, and grab a tab delimited
portion of it. I often use comma delimited text files, and use Jet
Oledb4. I read that I would need an ini if the file wasn't comma
delimited - if this is true, I am not sure of the easiest process to
create an ini. The string has a header.


Have a look at <http://www.connectionstrings.com> -> "Text"...


Thanks for the tip. The text is in memory in a string - do you think it is
best to save the text to a text file, then import using Jet like this?

Thanks,

Joe
Nov 20 '05 #3
Joe Fisherman <no*********************@noneofyourdamnedbizness.z oo>
wrote in news:Xn*********************************@216.196.1 05.130:
hi***************@gmx.at (Herfried K. Wagner [MVP]) wrote in
* Joe Fisherman <jf********@outdoor--------adventures.com> scripsit:
I have used regex to parse a huge text file, and grab a tab
delimited portion of it. I often use comma delimited text files,
and use Jet Oledb4. I read that I would need an ini if the file
wasn't comma delimited - if this is true, I am not sure of the
easiest process to create an ini. The string has a header.


Have a look at <http://www.connectionstrings.com> -> "Text"...


Thanks for the tip. The text is in memory in a string - do you think
it is best to save the text to a text file, then import using Jet like
this?

I ended up giving up on this route. Saving to a temporary text file, then
reading with JET into a dataset worked fine, but seemed like an awkward way
to do it when the source was already in a string. I used the string split
on the line feed, then a string split on the tab character, then parsed
away.. It looks like it is working fine. Not sure if I did the 'most
efficient' thing.

Joe

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Martin Dieringer | last post by:
I am trying to split a file by a fixed string. The file is too large to just read it into a string and split this. I could probably use a lexer but there maybe anything more simple? thanks m.
22
by: argniw | last post by:
I have a table that looks like this: Forest Residents Black Josh Black Joellen Black Mary Jane Brown Gertrude Brown Josh Brown Mary Jane
5
by: Yama | last post by:
Hi, I am looking to create a report comma delimited on a click of a button. Explanantion: 1. Get from the database: "SELECT * FROM Customers WHERE Region = 'CA'" 2. Use either DataReader or...
2
by: Ed Brown | last post by:
I'm working on a VB.Net application that needs to do quite a bit of string pattern matching, and am having problems using the "LIKE" operator to match the same string twice in the pattern. For...
5
by: Peter | last post by:
I'm wondering if someone can tell me whether the following set of regex substitutions is possible. I want to convert parallel legal citations into single citations. What I mean is, I want to...
3
by: Avi | last post by:
I need to create a text file that has the data from the 10 tables in the database. The number of fields in the tables exceeds 255 and so I cannot make a new table with all the fields and then...
1
by: Fordraiders | last post by:
vb.net 2003 Office 2003 What I have: C:\TestData\Input.txt Text File Pipe Delimited : 4 columns Of data example: 00001|NO BRAND NAME ASSIGNED|6DU27|M3-.5 X 6 FLAT HD SOCKET CAP SCREW,...
5
by: tom.hepworth | last post by:
Hi I have a problem which I hope someone can help me with because I really don't even know where to start with it. I am using Access 2003. I have a delimited text file which contains about...
0
by: wisaunders | last post by:
the file I'm importing has > 200,000 records I have one problem: One of the columns in the .txt file (customerID) has almost all Inetger values except for about 30 records. Those 30 records...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.