Problem with "Capture to variable" filter

Get help with installation and running here.

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

Post Reply
User avatar
Fixer
Posts: 25
Joined: Thu Jul 31, 2008 6:39 am
Location: European Union > Poland
Contact:

Problem with "Capture to variable" filter

Post by Fixer »

How to change filter below to get expected result?

Trial input:
REM "B0001"
a1|b1
a2|b2
a3|b3
a4|b4
a5|b5
a6|b6
REM "B0002"
a1|c1
a2|c2
a3|c3
REM "B0003"
REM "B0004"

Trial output
REM "B0001"
a1|B0004
a2|B0004
a3|B0004
a4|B0004
a5|B0004
a6|B0004
REM "B0002"
a1|B0004
a2|B0004
a3|B0004
REM "B0003"
REM "B0004"

Result expected
REM "B0001"
a1|B0001
a2|B0001
a3|B0001
a4|B0001
a5|B0001
a6|B0001
REM "B0002"
a1|B0002
a2|B0002
a3|B0002
REM "B0003"
REM "B0004"

My filter:

Code: Select all

TextPipe Server Edition
Purchased by: ___

Filter Title: C:\test.fll

Filter List
-----------
Filter options
|  [ ] Log to file
|  [X] Append to logfile
|  Log filename: textpipe.log
|  Threshold 500
|
|--Input from file(s)
|     [ ] Confirm before processing each file
|     [ ] Confirm before processing read/only files
|     [ ] Delete input files after processing
|     Skip binary files
|       Sample size 100 characters
|   
|--Perl pattern [^REM "(B\d+)"$] with []
|  |  [X] Match case
|  |  [ ] Whole words only
|  |  [ ] Case sensitive replace
|  |  [ ] Prompt on replace
|  |  [ ] Skip prompt if identical
|  |  [ ] First only
|  |  [ ] Extract matches
|  |  Maximum text buffer size 9999999
|  |  [ ] Maximum match (greedy)
|  |  [ ] Allow comments
|  |  [ ] '.' matches newline
|  |  [ ] UTF-8 Support
|  |
|  +--Capture to variable @pacjent
|      Reset: 3
|      
|--Perl pattern [^(.*)\|(.*)$] with [$1|@pacjent]
|     [ ] Match case
|     [ ] Whole words only
|     [ ] Case sensitive replace
|     [ ] Prompt on replace
|     [ ] Skip prompt if identical
|     [ ] First only
|     [ ] Extract matches
|     Maximum text buffer size 9999999
|     [ ] Maximum match (greedy)
|     [ ] Allow comments
|     [ ] '.' matches newline
|     [ ] UTF-8 Support
|   
+--Output to file(s)
      [ ] Only update date on changed files
      [ ] Append mode
      [ ] Change extension to: .txt
      [ ] Open output file
    Only output modified files    Backup mode      [ ] Remove empty output files    

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

Re: Problem with "Capture to variable" filter

Post by DataMystic Support »

Add a Filters\Restrict\Each line in turn, and drag all your filters inside it. This forces the capture to match each line one at a time.
User avatar
Fixer
Posts: 25
Joined: Thu Jul 31, 2008 6:39 am
Location: European Union > Poland
Contact:

Re: Problem with "Capture to variable" filter

Post by Fixer »

thx it works fine :)
Attachments
CaptureText.rar
Capture Text to variable
(788 Bytes) Downloaded 1416 times
Post Reply