I have a string with a pattern similar to the following one:
TITLE.wordX. aaa.: AAAAAAA;AAAAA. BBBB: bbbb.
I want to split this strings by ". " for getting something like: ['TITLE','wordX. aaa.: AAAAAAA;AAAAA', 'BBBB: bbbb']
The problem is that the string 'wordX. aaa.: AAAAAAA;AAAAA'
contains a dot itself, so by spliting the string as I previously said, the real output would be:['TITLE','wordX','aaa.: AAAAAAA;AAAAA', 'BBBB: bbbb']
Therefore, I want a regex that allows me to tell the split to find "every dot which is not followed by wordX". Looking for this on the internet, I found that some suggested using the negative lookahead for these cases, like ^((?!wordX).)*$
. Nevertheless, this has not worked for me apparently (maybe I am not using it the right way).
Due to all this, I would like to know how to build a regex for matching every dot that does not have the wordX inmediately before and that is followed by a space.