Contextual help for T-filter, bad example

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

Posts: 636
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Contextual help for T-filter, bad example

Postby DFH » Thu Dec 30, 2010 8:45 pm

The contextual help for T-Filter reads as follows:

Found under Filters\Special

The T-Filter allows you to process the same input in a number of ways.

Let's say you wanted to first count the number of blank lines in your text and save this value to a new file/clipboard or capture variable, and then sort the text removing duplicate lines.

You would add a T-Filter, and as a subfilter of it, you would place the filters to identify blank lines (e.g. a restrict to matching lines with pattern text of '^$'), a count lines filter and the appropriate output filters such as a Secondary Output filter.

Once this side of the T has finished processing, the data is discarded, and the original text continues processing just as though the T-Filter did not exist.

Surely '^$' no longer matches a blank line!

cf. Using ^$ in a replace filter and doing a trial run does not change anything.

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

Re: Contextual help for T-filter, bad example

Postby DataMystic Support » Mon Jan 03, 2011 11:49 am

^$ in a search/replace has zero length and therefore is not treated as a valid match, since it could replace forever without consuming any input.
^$ in a line match is the only way of specifying a empty line, and is quite valid.

Simon Carter, - Insulin dose calculator for Type 1 diabetes - 250,000 free software downloads - send huge email attachments

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

Who is online

Users browsing this forum: Bing [Bot] and 2 guests