Problem with "Capture to variable" filter
Posted: Sun Jul 10, 2011 9:18 pm
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:
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
----------