any experience with vba regex substition codes? I've tried the followings, which are working both on regex101.com and on regexr.com.
$&
\0
They are unfortunately not working in my VBA code. Any similar experience?
Example: https://regex101.com/r/5Fb0EV/1
VBA code:
    Dim MsgTxt As String
    ...
    strPattern = "(Metodo di pagamento).*\r\x07?.*"  
    With regEx
        .Global = True
        .MultiLine = True
        .IgnoreCase = True
        .Pattern = strPattern
        MsgTxt = regEx.Replace(MsgTxt, "\0#END")
    End With
Input string:
Metodo di pagamento selezionato: 
Mastercard 
Expected ouput:
Metodo di pagamento selezionato: 
Mastercard #END
 
    