I want a regex that extracts all the words inside a "WUB" but didin't found any solution!
for example it would extract from
"WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB"
the following strings (without the quotes)
["WE", "ARE", "THE", "CHAMPIONS"]
here's what i've tried so far:
((?:.(?!WUB))+)
But it gives me the following output (from the example above):
['WUBW', 'WUBAR', 'WU', 'WUBTH', 'WUBCHAMPION', 'WUBM', 'WUBFRIEN', 'WUB']
Please help me more understand this problem