This must be a bug: The back reference doesn’t work in replace function? What good is it if it doesn’t? I mean, you can do some simpleminded things but can’t you find a good RegEx package to use? This is rather annoying to learn after so much time editing in a large document with the promise that Scrivener supported RegEx. It doesn’t really.
Will this be fixed prior to publication of the master? Can we get multi-file regex search/replace? Full regex goodness? Please?
However, QtRegExp is not completely perl compatible. If it’s not doing backward capture, it should be.
I tested this…
The QT reference give gives a specific example of a regular expression.
Which searches for any word followed by word characters followed by non-word characters followed by the same word followed by a word boundary.
I put text in a document.
And that was "that."
Which should meet the search condition. “that” is followed by word characters (was) followed by 1 or more non-word characters (") followed by the same word, (that), followed by a Word boundary (.).
The search using the regular expression found nothing, and it should have found one match. I tried another (much simpler use:
, which should match a word, followed by any number of characters, and then that word again).
I’d have to say the bug is confirmed; regex is not working as expected.