var teststring = "Somebodys phone (home)"
var regexpattern = "[\\w\\s]+[^(\\w)]"
var result = transform("REGEX", regexpattern, teststring )
logInfo("Regex result", result)
but the variable result is always NULL.
I think i’ve missed something simple, but i can’t find what…
does not contain a capture group and therefore nothing will be returned.
So the RegEx transformation puts ^ at the beginning of the expression and $ to the end.
With both characters i’m having troubles find a regex that does what I want.
Remove all word within parentheses plus the parentheses themselves from a string.
I’m trying to find the correct expression with regex101, but can somebody give me a hint?
it is working!
Thanks a lot - i don’t think i need to tighten it., since I never can be sure what comes before the string in ().
I’m letting Alexa tell me who’s calling me and therefore I don’t want:
Incoming call from Sascha Mobile (Mobile)
So and since my Wife also adds contacts to the phonebook, i can’t tighten it