Newbie Request for help on text manipulation

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
mark spooner
Posts: 4
Joined: Mon Sep 08, 2003 5:13 pm
Location: Oxford, UK
Contact:

Newbie Request for help on text manipulation

Post by mark spooner »

Hi

As a newbie to textPipe Pro I would like some help with the following problem I have been trying to work on for several hours no. It's probably quite simple, but I'm having a mental block.

Does anyone know what script filter step I need to add to accomplish the following:

I have several thousand names and addresses in an unstructured format. The bulk of the text I can reorgnise quite simply but the following has stumped me.

Any help would be much appreciated. :)

I would like to go from:

FROM:

Tel: 01865 262600 • Matrimonial & Family Problems
• Children Act Proccedings
• Residential Conveyancing
• Wills,Probate & Trust
• Private Defence & Licensing
• Company, Commercial & Property

TO:

Tel: 01865 262600
• Matrimonial & Family Problems
• Children Act Proccedings
• Residential Conveyancing
• Wills,Probate & Trust
• Private Defence & Licensing
• Company, Commercial & Property

The existing script filter so far is:

Filter List
-----------
Filter options
| [X] Log to file
| [X] Append to logfile
| Log filename: C:\BP\textpipe\install\textpipe.log
| Threshold 500
|
|--Input from Trial Run
|
|--Remove blanks from Start of Line
|
|--Replace [Website] with []
| [ ] Match case
| [ ] Whole words only
| [ ] Case sensitive replace
| [ ] Prompt on replace
| [ ] Skip prompt if identical
| [ ] First only
| [ ] Extract matches
|
|--Replace [TXT details] with []
| [ ] Match case
| [ ] Whole words only
| [ ] Case sensitive replace
| [ ] Prompt on replace
| [ ] Skip prompt if identical
| [ ] First only
| [ ] Extract matches
|
|--Replace [Map/Directions] with []
| [ ] Match case
| [ ] Whole words only
| [ ] Case sensitive replace
| [ ] Prompt on replace
| [ ] Skip prompt if identical
| [ ] First only
| [ ] Extract matches
|
|--Replace [Save details] with []
| [ ] Match case
| [ ] Whole words only
| [ ] Case sensitive replace
| [ ] Prompt on replace
| [ ] Skip prompt if identical
| [ ] First only
| [ ] Extract matches
|
|--** DISABLED ** Remove matching lines [• ]
| [ ] Include line numbers
| [ ] Include filename
| [ ] Match case
| [ ] Count matches
| Pattern type: 0
| Context before: 0
| Context after: 0
|
|--Remove blank lines
|
|--Replace [Tel: ] with []
| [X] Match case
| [ ] Whole words only
| [ ] Case sensitive replace
| [ ] Prompt on replace
| [ ] Skip prompt if identical
| [ ] First only
| [ ] Extract matches
|
|--Comment...
| Click >>Here<< or press F1 for help
|
| TextPipe uses 'filters' to perform changes to each file. A 'filter list' is a sequence of changes, like 3 different search and replace operations.
|
| You can add filters from the menus above - Convert, Add, Remove, Email, Replace, Special, Maps, Restrict.
|
| For:
| * Search/replace - look in the Replace Menu
| * Unix/DOS/Mainframe End-of-line conversion - look in the Convert Menu
| * Extract email addresses - look in the Email Menu
| * Remove HTML codes - look in the Remove Menu
| * Join (merge) files together - look in the Special Menu
| * Split files apart - look in the Special Menu
| * Join files and then sort them - add a Special Menu\Merge filter followed by a Special Menu\Sort filter
|
| Just click the menu item to add the filter.
|
| This filter is a comment filter that is useful to document what you are trying to achieve.
|
| Please read the text under the 'Comments' tab.
|
+--Output to clipboard


Files List
----------
crystal

Post by crystal »

I would try searching for pattern

(\d+)\s*\r\n

and replace with

$1

ie a group of digits followed by optional white space, followed by a line feed, replace with just the original digits.
mark spooner
Posts: 4
Joined: Mon Sep 08, 2003 5:13 pm
Location: Oxford, UK
Contact:

Post by mark spooner »

Hi Simon,

Thanks again. I have struggled for a coupkle of days with this one. I know it's just coming to grips with all the various options and the hundreds of bells and whistles of Textpipe Pro.

Cheers, Mark.
ITCS IT Consultancy Services
Security, Networking and Infrastructure Consultancy Services
TEL: 07796 134602
EML: <<mailto:mark@itcs.biz>>
WEB: <<http://www.itcs.biz/>>
Post Reply