How Do I use RegEx to Remove Substring From End of String?

thanks any idea how I can turn


Here is some more - text. And here is 4 more - The Alchemist

into this

Here is some more - text. And here is 4 more

I would capture everything before the last [space][hyphen][space] sequence:

(.*)\h-\h

Captured text: Here is some more - text. And here is 4 more

regex101 snippet

Something to experiment with: (?-si) - The Alchemist(?!#)|( )(?=.+#)|#

Well, if “ - The Alchemist” is a fixed string then you don’t need a regex at all :wink:

Just replace the string with nothing (via normal string substitution).

53-pty-fs8

I moved your new question to a new topic. Please follow this policy in the future.