How do I remove anything after a certain word?

Is it possible to make an action that can "delete" any word *after a *certain word?
For example

Tags before
Dave matthews Band live at rockford

After tags
Dave Matthews Band

So I want to be able to make an action to erase every word after a certain word.
So in this example it's --erase every word after "Band"

Can anybody help me?

Yes. That is possible.
E.g. an action of the type "Replace with regular expression"
Source: certain word.*
Replace with: certain word

That's not what I meant :grin: I'll give you an example:

I want to do this

Tags before
Dave matthews band live at rockford

After tags
Dave Matthews Band

So I want to be able to make an action to erase every word after a certain word.
So in this example it's / erase every word after "Band"

That is more or less what I used as principle example, only that in my case I did not use "band" but "certain word".

The pattern stays the same:
$regexp('Dave matthews band live at rockford',band.*,band)
(which is the scripting variation of "Replace with regular expression)
and for the sake of it being more flexible, you enter %album% instead of "Dave matthews band live at rockford"
This function does not switch the case, though.

1 Like

Nice! Thanks for clearing that up for me, I was really confused but I understand now. I will try🤝