Trying to make a very simple Regular Expression, having a tough time with it. I'm moderately experienced with RegEx, but by no means a pro.
Example string:
flashback rise [bump out @ 01:03:11:05]
desired string:
flashback rise
Currently, using Action "Search and Replace System Clipboard Using Regular Expression (ignoring case)
Search System Clipboard
for Regular Expression (ignoring case)
[[].*[]]
and replace with:
In external RegEx testers, I'm getting the brackets, all enclosed text, and the preceding space to all match, but not so in Keyboard Maestro. What am I doing wrong here? Thanks in advance for the help!
[] matches anything inside it. So if you put nothing inside it, it is meaningless in the RegEx expression. If you need to match a literal [, you need to escape it: \[.
This is another way:
(.+?) \[
Note, there is a space between ) and \ (assuming you don't need the space in your result).