Get help with installation and running here.
Moderators: DataMystic Support, Moderators
-
DFH
- Posts: 967
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
Post
by DFH » Mon Feb 13, 2012 11:45 pm
The following subfilter reports an error:
Code: Select all
Replace [$$$Matthew 0:0\r\n] with [$$$[ Testament 2 Heading ]\r\n\r\n$$$Matthew 0:0\r\n]
[X] Match case
[ ] Whole words only
[ ] Case sensitive replace
[ ] Prompt on replace
[ ] Skip prompt if identical
[ ] First only
[ ] Extract matches
The logged error message is
Code: Select all
2012-02-13 13:39:05,Error,$M is not a valid subexpression identifier for this pattern.
The maximum allowed subexpression identifier is $0 (or escape the $ sign using '$$')
Surely $n variables are only applicable for Perl patterns, not for Replace
Exact ?
David
-
DFH
- Posts: 967
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
Post
by DFH » Mon Feb 13, 2012 11:55 pm
A workaround is to double up the $ characters in the replace with:
Code: Select all
Replace [$$$Matthew 0:0\r\n] with [$$$$$$[ Testament 2 Heading ]\r\n\r\n$$$$$$Matthew 0:0\r\n]
[X] Match case
[ ] Whole words only
[ ] Case sensitive replace
[ ] Prompt on replace
[ ] Skip prompt if identical
[ ] First only
[ ] Extract matches
IMHO, Such doubling of special matching characters should only be required for Perl pattern replacements!
-
DataMystic Support
- Site Admin
- Posts: 2230
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
-
Contact:
Post
by DataMystic Support » Thu Feb 16, 2012 6:17 am
It was designed to allow replacing an exact match with extra text, using the same case as the original text.
If you right-click the field, you can escape these very easily.
-
DFH
- Posts: 967
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
Post
by DFH » Mon Feb 20, 2012 3:57 am
Thanks.