Removing line returns between quotes
Posted: Thu Oct 22, 2009 12:50 pm
I have a pipe delimited filed from a database extract which I need to import into another tool (Omniscope) unfortunately there is a field containing line returns (real example in bold below) as this field in the application is freetype.
I would like to search and replace all the line returns between |" and "| so that each record is on a single line with 43 fields separated by pipes.
Each of these description fields contain letters from english alphabet, digits and punctuation marks (pretty much anything available on a UK keyboard - annoyingly some also contain a pipe!) but all within the quotes.
AM_WS_SD_CR|RDO - AM|V B|DESKTOP SOFTWARE AND BUSINESS USER APPS|APPLICATION - FUNCTIONALITY / COMPONENT|PERSONAL FOLDERS|LONDON|09/01/2009 04:22:46|END USER TECHNOLOGIES|DESKTOP|SOFTWARE DESKTOP APPLICATION|MICROSOFT OUTLOOK|BLAH|BLAH|Unable to Expand Personal Folder|36029|"Customer unable to expand personal folder.
Personal Folder Name: Archive
File Name: Archive.pst
Location: Clarion server"|BOB|003|SECONDARY|INC00000123456|0|TITLE|SMITH|09/01/2009 04:22:46|VS|WS_SD_CR|RDO - AM|Low|END USER TECHNOLOGIES|DESKTOP|SOFTWARE DESKTOP APPLICATION|MICROSOFT OUTLOOK|EUROPE|09/01/2009 04:22:41|DESKTOP SOFTWARE AND BUSINESS USER APPS|APPLICATION - FUNCTIONALITY / COMPONENT|PERSONAL FOLDERS|OCS|vb|0|TEMPLATE|IT
To summarise I require a search and replace string to turn the enbolded text above into
|"Customer unable to expand personal folder. Personal Folder Name: Archive File Name: Archive.pst Location: Clarion server"|
I hope I have everything required here, any and all help appreciated.
Many thanks
Andrew
I would like to search and replace all the line returns between |" and "| so that each record is on a single line with 43 fields separated by pipes.
Each of these description fields contain letters from english alphabet, digits and punctuation marks (pretty much anything available on a UK keyboard - annoyingly some also contain a pipe!) but all within the quotes.
AM_WS_SD_CR|RDO - AM|V B|DESKTOP SOFTWARE AND BUSINESS USER APPS|APPLICATION - FUNCTIONALITY / COMPONENT|PERSONAL FOLDERS|LONDON|09/01/2009 04:22:46|END USER TECHNOLOGIES|DESKTOP|SOFTWARE DESKTOP APPLICATION|MICROSOFT OUTLOOK|BLAH|BLAH|Unable to Expand Personal Folder|36029|"Customer unable to expand personal folder.
Personal Folder Name: Archive
File Name: Archive.pst
Location: Clarion server"|BOB|003|SECONDARY|INC00000123456|0|TITLE|SMITH|09/01/2009 04:22:46|VS|WS_SD_CR|RDO - AM|Low|END USER TECHNOLOGIES|DESKTOP|SOFTWARE DESKTOP APPLICATION|MICROSOFT OUTLOOK|EUROPE|09/01/2009 04:22:41|DESKTOP SOFTWARE AND BUSINESS USER APPS|APPLICATION - FUNCTIONALITY / COMPONENT|PERSONAL FOLDERS|OCS|vb|0|TEMPLATE|IT
To summarise I require a search and replace string to turn the enbolded text above into
|"Customer unable to expand personal folder. Personal Folder Name: Archive File Name: Archive.pst Location: Clarion server"|
I hope I have everything required here, any and all help appreciated.
Many thanks
Andrew