"Keep" instead of {{replace}}

I have a String that contains a (first and last) name, which I exclusively want to extract. This is the only instance, where two words in a row start with capital letters. I thought it would be easy enough to use replace with regex \b[A-ZÄÖÜ][a-zäöüß]*\b\s+[A-ZÄÖÜ][a-zäöüß]*\b. While this regex extracts the name correctly I cant for the life of me figure out how to “inverse” it. In the past I used a nested replace: I deleted what I wanted and replaced everything that was left with “”. But in this case this approach doesn’t seem to work (probably because the name is right in the middle of the string). I spent hours trying to figure out the “negative” Regex, but even with the help of ChatGPT and countless tutorials I didn’t manage to solve it that way either.

I considered using the text parser module, but since I am working with an iterator/aggregator setup this would cost several hundred to over 1.000 operations per run insted of 6 if i manage to do it within the textfield with the string functions.

Maybe someone here is able to help me with the regex or give some advice on how to work around this issue.
Thanks a ton in advance!

Hi @Alexander_Hirsch
You can use text parser “Match Pattern” module to extract the name from a string.We have demonstrated a sample workflow in the loom.
Loom:Explanation

Regex:\b[A-Z][a-z]+ [A-Z][a-z]+\b

Regards,
Msquare Automation - Gold Partner of Make

Free Consultation | Live Implementation

Visit us here | Youtube Channel

HI @Alexander_Hirsch
With replace function:
{{replace(“My name is Shirin Saleem”; “/\b[A-Z][a-z]+ [A-Z][a-z]+\b/”; emptystring)}}

Output:

Regards,
Msquare Automation - Gold Partner of Make

Free Consultation | Live Implementation

Visit us here | Youtube Channel

Thanks for your advice!
Unfortunately, as stated in the original post, using an additional module isn’t really an option since it would dramatically increase the amount of operations used (10x to 100x per run).
Do you see any alternative that works within the realms of the built-in string functions?

Thank you for this suggestion.
I am looking for a way to replace anything BUT the name - removing it isn’t the issue.
I have to extract the name somehow without using an additional module.