RegEx Help re Replacement Patterns

In the on line Xojo Help for RegEx the ‘Replacement Patterns’ table offers that the same pattern ($’) does two things:

[quote]Replaced with the entire target string before match.
Replaced with the entire target string following the matched text.

Is this correct or is the pattern wrong on one of them?

When I created RegExRX, I included $` for “entire target string before the match”, and I got all of those out of the docs at the time, so I think something got changed over time. Try that.

Thank you.

I have created a Feedback change request: <>

Edit (Paul): Corrected Feedback link

Well, that is some eagle-eyed work. Checking the doc wiki, this has been wrong since its inception in 2009. But I found that it was correct in my printed copy of the LR from RB 2007. Anyway, I’ve updated the LR in the wiki.

Fun fact about PCRE, the common regular expression library that both Xojo and MBS rely on: replacement tokens are not part of the package. If you want to transport your pattern to other environments, even if they use PCRE, you might have to use different replacement tokens, or none at all.

In RegExRX, I had to write code to emulate the ones used in Xojo since I was using MBS.