getting all data on one line? (remove breaks)

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

Guest

getting all data on one line? (remove breaks)

Postby Guest » Sat Jun 04, 2005 1:05 am

i'm new to textpipe and so far i haven't been able to
find a solution to a (in my eyes not so difficult?) problem.

i have a .txt file containing multiple lines.
for getting them into my database, i need them
on one line, seperated by tabs. getting the tabs
there is no problem, i could even fix that in wordpipe.

example:

name: joop
year: 2000
age: 50


the layout is the same in every document (don't know
if that helps any :P)

now, i think i need multiple filters:

remove name:
remove year: ---> and replace it with a backspace or so ? and then a tab
remove age: ---> and remove the break before it here too, and then a tab


so it will look like this:

joop TAB 2000 TAB 50


can anyone help me with this...?
would save me 500 of manual db entrys (this is the only
missing link into getting all my records in the db)


thanks in advance!

himpie
Posts: 1
Joined: Sat Jun 04, 2005 12:58 am

Postby himpie » Sat Jun 04, 2005 1:52 am

hmmz...
simple \r\n removing does not work, it keeps certain returns in!

Guest

Postby Guest » Mon Jun 06, 2005 1:49 am

can noone help me ?
please i really need help on this one!

User avatar
DataMystic Support
Site Admin
Posts: 2164
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Postby DataMystic Support » Mon Jun 06, 2005 11:12 am

Your file probably has both \r\n and \n characters in it.

Why don't you just add 3 search/replace filters as you have described?

You could also use a perl or EasyPattern match to match all three lines together.

Note: A tab is

\t
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: Baidu [Spider] and 6 guests