Restrict to: Blocks of lines

Get help with installation and running here.

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

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

Restrict to: Blocks of lines

Post by alnico »

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: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Restrict to: Blocks of lines

Post by DataMystic Support »

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?
alnico
Posts: 74
Joined: Fri Oct 12, 2007 11:57 pm

Re: Restrict to: Blocks of lines

Post by alnico »

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: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Restrict to: Blocks of lines

Post by DataMystic Support »

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.
Post Reply