Hi
I'm trying to remove the email element from:
Person Smith personsmith@hotmail.com
I just want to paste "Person Smith"
Using the regex code [1]* which seems to work when I test it here: https://regex101.com.
When I use it in a keyboardmaestro function "Search and Replace System Clipboard Using Regular Expression (ignoring case)" it isolates the part I don't want rather than removing it. What am I doing wrong?
I didn't quite follow the logic of the regex (my fault, and I shall look into that further), so for my reply I am using my own attempt at the regex: ^(.*)<.*
That's the start of the line ^, then the text we want to keep (indicated by putting it inside round brackets), followed by the angle bracket and zero or more following characters.
The $1 means the text that matches inside the (first and only) set of round brackets.
Just in case you didn't know: if you wanted to use a variable instead of just the clipboard, you could also use the search using regular expression action: