Repeat subfilter suggestion
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
-
- Posts: 987
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
Repeat subfilter suggestion
A suggestion for an enhancement to TextPipe.
Repeat filter
This filter would repeat all subfilters N times in succession.
Advantages:
This would avoid having to paste numerous duplicate copies of a subfilter.
i.e. To cope with input patterns where [say] the number of repeat replacements may not be known in advance.
NB. This is not the same kind of situation as the existing Repeat file filter.
Repeat filter
This filter would repeat all subfilters N times in succession.
Advantages:
This would avoid having to paste numerous duplicate copies of a subfilter.
i.e. To cope with input patterns where [say] the number of repeat replacements may not be known in advance.
NB. This is not the same kind of situation as the existing Repeat file filter.
David
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Repeat subfilter suggestion
Can you give me an example? How is this different from say
(pattern){3,}
for 3 or more copies of pattern?
(pattern){3,}
for 3 or more copies of pattern?
-
- Posts: 987
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
Re: Repeat subfilter suggestion
It's not patterns containing a specified number of repeats that I have described.
Rather it's for the same pattern, with the replacement applied a specified number of times.
The context I had in mind is when you need to move a line upwards to before various other lines,
the number of which might vary from place to place in the input files.
The need arose for me while moving chapter tags in USFM files to before various header tags.
david
Rather it's for the same pattern, with the replacement applied a specified number of times.
The context I had in mind is when you need to move a line upwards to before various other lines,
the number of which might vary from place to place in the input files.
The need arose for me while moving chapter tags in USFM files to before various header tags.
david
David
-
- Posts: 987
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
Re: Repeat subfilter suggestion
Example:
Code: Select all
Comment...
| Move chapter tags
|
| - to before section headings
| - restrict first line to not be one with a verse tag
| - identical subfilter applied 4 times to cover Psalms (worst case)
|
|--Perl pattern [^\\v.+\r\n.+\r\n] 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 4096
| | [ ] Maximum match (greedy)
| | [ ] Allow comments
| | [ ] '.' matches newline
| | [X] UTF-8 Support
| |
| +--Perl pattern [^(\x5C.+)\r\n(\\c \d+)\r\n] with [$2\r\n$1\r\n]
| [X] Match case
| [ ] Whole words only
| [ ] Case sensitive replace
| [ ] Prompt on replace
| [ ] Skip prompt if identical
| [ ] First only
| [ ] Extract matches
| Maximum text buffer size 4096
| [ ] Maximum match (greedy)
| [ ] Allow comments
| [ ] '.' matches newline
| [X] UTF-8 Support
|
|--Perl pattern [^\\v.+\r\n.+\r\n] 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 4096
| | [ ] Maximum match (greedy)
| | [ ] Allow comments
| | [ ] '.' matches newline
| | [X] UTF-8 Support
| |
| +--Perl pattern [^(\x5C.+)\r\n(\\c \d+)\r\n] with [$2\r\n$1\r\n]
| [X] Match case
| [ ] Whole words only
| [ ] Case sensitive replace
| [ ] Prompt on replace
| [ ] Skip prompt if identical
| [ ] First only
| [ ] Extract matches
| Maximum text buffer size 4096
| [ ] Maximum match (greedy)
| [ ] Allow comments
| [ ] '.' matches newline
| [X] UTF-8 Support
|
|--Perl pattern [^\\v.+\r\n.+\r\n] 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 4096
| | [ ] Maximum match (greedy)
| | [ ] Allow comments
| | [ ] '.' matches newline
| | [X] UTF-8 Support
| |
| +--Perl pattern [^(\x5C.+)\r\n(\\c \d+)\r\n] with [$2\r\n$1\r\n]
| [X] Match case
| [ ] Whole words only
| [ ] Case sensitive replace
| [ ] Prompt on replace
| [ ] Skip prompt if identical
| [ ] First only
| [ ] Extract matches
| Maximum text buffer size 4096
| [ ] Maximum match (greedy)
| [ ] Allow comments
| [ ] '.' matches newline
| [X] UTF-8 Support
|
|--Perl pattern [^\\v.+\r\n.+\r\n] 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 4096
| | [ ] Maximum match (greedy)
| | [ ] Allow comments
| | [ ] '.' matches newline
| | [X] UTF-8 Support
| |
| +--Perl pattern [^(\x5C.+)\r\n(\\c \d+)\r\n] with [$2\r\n$1\r\n]
| [X] Match case
| [ ] Whole words only
| [ ] Case sensitive replace
| [ ] Prompt on replace
| [ ] Skip prompt if identical
| [ ] First only
| [ ] Extract matches
| Maximum text buffer size 4096
| [ ] Maximum match (greedy)
| [ ] Allow comments
| [ ] '.' matches newline
| [X] UTF-8 Support
|
|--Perl pattern [^\\v.+\r\n.+\r\n] 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 4096
| | [ ] Maximum match (greedy)
| | [ ] Allow comments
| | [ ] '.' matches newline
| | [X] UTF-8 Support
| |
| +--Perl pattern [^(\x5C.+)\r\n(\\c \d+)\r\n] with [$2\r\n$1\r\n]
| [X] Match case
| [ ] Whole words only
| [ ] Case sensitive replace
| [ ] Prompt on replace
| [ ] Skip prompt if identical
| [ ] First only
| [ ] Extract matches
| Maximum text buffer size 4096
| [ ] Maximum match (greedy)
| [ ] Allow comments
| [ ] '.' matches newline
| [X] UTF-8 Support
|
+--Perl pattern [^\\v.+\r\n.+\r\n] 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 4096
| [ ] Maximum match (greedy)
| [ ] Allow comments
| [ ] '.' matches newline
| [X] UTF-8 Support
|
+--Perl pattern [^(\x5C.+)\r\n(\\c \d+)\r\n] with [$2\r\n$1\r\n]
[X] Match case
[ ] Whole words only
[ ] Case sensitive replace
[ ] Prompt on replace
[ ] Skip prompt if identical
[ ] First only
[ ] Extract matches
Maximum text buffer size 4096
[ ] Maximum match (greedy)
[ ] Allow comments
[ ] '.' matches newline
[X] UTF-8 Support
David
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Repeat subfilter suggestion
Hi David - we're adding this to v9.5 now ready for the next release.
-
- Posts: 987
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
-
- Posts: 987
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
Re: Repeat subfilter suggestion
The filter cannot be used in TextPipe Standard edition, even though it was I who requested the feature.
David
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Repeat subfilter suggestion
Woops! Sorry - that will be fixed in the next few days.
-
- Posts: 987
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Repeat subfilter suggestion
No problem! Thanks for the suggestion.