Hi all, bit new to this, having read through the forums I am none the wiser I have a text file where the columns are broken up using the group by pp.vendorid, vg.vendorgroupid, vg.nameipe key (|) but there have been unwanted carriage returns inserted, like half way through a description, how can I get text pad to put one whole record on each line.
Any help would be gratefully accepted as it's driving me up the wall now )
Carriage Returns
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
1. Can you post a sample of the text before and after it has been fixed?
2. Is the order of the records important?
3. On a "good" record, are there exactly 2 | dividers?
4. On a "good"record, does the line end with a |?
A possible solution (depending on the above replies) is to identify all the "bad records and then delete the appropriate returns in those lines. But let's wait and see your answers first.
2. Is the order of the records important?
3. On a "good" record, are there exactly 2 | dividers?
4. On a "good"record, does the line end with a |?
A possible solution (depending on the above replies) is to identify all the "bad records and then delete the appropriate returns in those lines. But let's wait and see your answers first.
-
- Posts: 11
- Joined: Wed Jul 02, 2003 6:48 am
Hi there, thanks for the reply, below is a example of a bad record
19|'Northern'|'The Hollies'|'01347 833154'|'01347833154'|'Station Road,,
Tollerton,,
Yorkshire,,
YO61 1TS'|'All properties on this site are now sold subject to contract. Please contact the site for further details.',,
I would like the whole record on one line rather than over 5 lines, there are about 500 records in my text file, any help would be great.
Thansk Phil
19|'Northern'|'The Hollies'|'01347 833154'|'01347833154'|'Station Road,,
Tollerton,,
Yorkshire,,
YO61 1TS'|'All properties on this site are now sold subject to contract. Please contact the site for further details.',,
I would like the whole record on one line rather than over 5 lines, there are about 500 records in my text file, any help would be great.
Thansk Phil
In this particular case search for
\n\([^|]+\)$
and replace all with
\1
(reg exp of course) would be a start.
(this will append all lines with no "|" to the previous line)
then search for
\n\([^|]*|[^|]*\)$
replace with
\1
(this will append all lines with one "|" to the previous line)
then
\n\([^|]*|[^|]*|[^|]*\)$
then
\n\([^|]*|[^|]*|[^|]*|[^|]*\)$
etc
Hey, so it's not as elegant as you'd like but it sure beats doing it all by hand
\n\([^|]+\)$
and replace all with
\1
(reg exp of course) would be a start.
(this will append all lines with no "|" to the previous line)
then search for
\n\([^|]*|[^|]*\)$
replace with
\1
(this will append all lines with one "|" to the previous line)
then
\n\([^|]*|[^|]*|[^|]*\)$
then
\n\([^|]*|[^|]*|[^|]*|[^|]*\)$
etc
Hey, so it's not as elegant as you'd like but it sure beats doing it all by hand
-
- Posts: 11
- Joined: Wed Jul 02, 2003 6:48 am
-
- Posts: 11
- Joined: Wed Jul 02, 2003 6:48 am