SF_String.ReplaceRegex

I am trying to work on a string using SF_String.ReplaceRegex in a Basic Macro.
I need to extract part of a string, e.g.
origin = “%abc.%def%09”
pattern = “^(.[A-Za-z0-9]+…[a-z]+).([0-9]+)$”
repl = “$1$2”
xx = SF_String.ReplaceRegex(origin, pattern, repl)
xx should be “%abc.%def09” but xx is the origin.
How is pattern and repl to be specified to get the desired result?

Please upload your .odt type sample file here, and the embedded macro code.

Then I could try (instead of searching for the documentation)

origin = "%abc.%def%09"
xx = origin
pattern = "^(.[A-Za-z0-9]+…[a-z]+).([0-9]+)$"
repl = "$1$2"
r = SF_String.ReplaceRegex(xx, pattern, repl)

Documentation is here and supports your usage:
https://help.libreoffice.org/latest/en-US/text/sbasic/shared/03/sf_string.html?&DbPAR=SHARED&System=UNIX#ReplaceRegex

Do the listed examples with msgbox work for you?

PS: I recommend to use code-tags to enclose your example or quotes are messed up.
More details here: Can typographic quotes be switched off for ask.libreoffice.org?

Is there a complete documentation of the regular expressions accepted by ```
SF_String.ReplaceRegex, especially how to group them and how to return the value of such groups?

SF_String.xba (revision 1952c85f9ca8846e149016f54846342b74985ee8) - OpenGrok cross reference for /core/wizards/source/scriptforge/SF_String.xba

For a full list of supported metacharacters and syntax, see ICU Regular Expressions documentation
Regular Expressions | ICU Documentation

Above is quoted from LibreOffice+help:
https://help.libreoffice.org/latest/en-US/text/shared/01/02100001.html

(I assume Scriptforge is only an additional layer referencing the usual icu-libraries used by LibreOffice.)