Hello,
I have some really strange problem with FindChange.
I have read and experimented quite some time and I can’t find what’s wrong.
What I need to do:
Create grep replacements for any number – any dash, with spaces or not – any number //changeTo// same number – m-dash – same number.
This is my code:
grep {findWhat:”(\d)-(\d)”} {changeTo:”$1~_$2″} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}
grep {findWhat:”(\d)~=(\d)”} {changeTo:”$1~_$2″} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}
grep {findWhat:”(\d)~-(\d)”} {changeTo:”$1~_$2″} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}
grep {findWhat:”(\d)~=(\d)”} {changeTo:”$1~_$2″} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}
grep {findWhat:”(\d)~-“} {changeTo:”$1~s^_”} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}
grep {findWhat:”(\d)~=”} {changeTo:”$1~s^_”} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}
grep {findWhat:”(\d)~_”} {changeTo:”$1~s^_”} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}
The result:
Any of these are not working via FindChangeByList, but the funny thing is, they do work in normal grep search and replace.
Furthermore, I have discovered that even the simplest {findWhat:”\d”} doesn’t work in my case.
I’m starting to think there is some out-of-the-box reason, like encoding problems (some of my grep searches are in cyrillic).
My request:
Do you have any idea how to make this work?
Do you see how can I optimize my search?
A possible solution is to use grep queries and find some tool to chain them, but FindChangeByList already serves my needs very well, except for this issue with numbers.