Keeping N characters in a text string

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

carl34
Posts: 1
Joined: Thu Mar 09, 2017 3:56 am

Keeping N characters in a text string

Postby carl34 » Thu Mar 09, 2017 4:01 am

Hello
I am on a trial of your wonderful software. How do I replace a text string with the 3 first characters of the same text string (i.e.just keep first 3 characters) ? The text string can be of any length and will start with "$" and end with ".csv".
Thank you!
Carl

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

Re: Keeping N characters in a text string

Postby DataMystic Support » Sat Mar 18, 2017 7:49 am

Use an EasyPattern:

Find

Code: Select all

[ capture( 3 chars) as 'first', longest 1+ not cr or lf ]

Replace with

Code: Select all

@first@my new string
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: Bing [Bot], Yahoo [Bot] and 2 guests