Restrict to: Blocks of lines

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

alnico
Posts: 74
Joined: Fri Oct 12, 2007 11:57 pm

Restrict to: Blocks of lines

Postby alnico » Tue May 13, 2008 11:30 pm

Hi,
Restrict to: Blocks of lines...

I have just spent hours trying to figure out why this restriction would not work...I am pretty sure it is because there is a limit on the size it can handle.
Therefore, I tested with a replace filter and had to increase the the 'Maximum Match Size' in order for it to match. If this is indeed the problem then I am assuming that exposing the 'Maximum Match Size' for the Restrict to: Blocks of lines filter would fix it?

Just letting you know,

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

Re: Restrict to: Blocks of lines

Postby DataMystic Support » Thu May 15, 2008 1:46 pm

No, there is no restriction on size here, apart from your memory limit.

To test it working on a small number of lines, use a filter like this:

Code: Select all

Restrict to blocks of 10 lines
|
+--Perl pattern [.*?] with [$0]
      [ ] Match case
      [ ] Whole words only
      [ ] Case sensitive replace
      [X] Prompt on replace
      [ ] Skip prompt if identical
      [ ] First only
      [ ] Extract matches
      Maximum text buffer size 40096
      [ ] Maximum match (greedy)
      [ ] Allow comments
      [X] '.' matches newline
      [ ] UTF-8 Support


The restriction doesn't care about the number of lines, but the search/replace does (for efficiency).

What are you trying to do?
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

alnico
Posts: 74
Joined: Fri Oct 12, 2007 11:57 pm

Re: Restrict to: Blocks of lines

Postby alnico » Fri May 16, 2008 12:24 am

Here is what I am doing:

|--Restrict to blocks of 2 lines
| |
| +--Restrict to each line in turn
| |
| +--Restrict to between tags <table>...</table>

The "Restrict to blocks of 2 lines" fails at two lines that are a total of 17,000 characters in length, so if I...
Replace the "Restrict to blocks of 2 lines" filter with: Perl pattern [^.*\r\n.*\r\n] with [$0] and increase the Maximum text buffer size...it then works.

Thanks,

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

Re: Restrict to: Blocks of lines

Postby DataMystic Support » Fri May 16, 2008 12:03 pm

I'd be willing to bet that it doesn't :-) I'll bet that you have an inadvertent CR or LF on the line somewhere. Place a Convert EOL filter at the top of your filter list - convert Auto to DOS, and see what happens then.

We'd love to see the sample data if this still doesn't work. The Restrict to lines filter doesn't use a pattern match - it uses a highly efficient state machine with no practical size limit.
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: No registered users and 1 guest