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
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
Something to experiment with: (?-si) - The Alchemist(?!#)|( )(?=.+#)|#
Well, if “ - The Alchemist” is a fixed string then you don’t need a regex at all
Just replace the string with nothing (via normal string substitution).
I moved your new question to a new topic. Please follow this policy in the future.