I have this string.
a='SAD; Happy; ING:train coca'
OR
a='SAD; Happy; ING(train coca'
OR
a='SAD, Happy, ING[train coca'
I need to detect this string : "; ING:" for that I use this regex :
listRE=re.findall(r';\s*[A-Z]+\s*[\:|\[|\(]\s*[A-Z]+', a)
What i need to do is to delete what is between ; and : (not always ; : as shown in the regex)
I do that
for i in listRE:
p=re.compile(i)
a=re.sub(p, r'', a)
but it s deleting my text !! my target is :
a='SAD; Happy; train coca'
your help is more than welcome Thank you for your help
\s+\w+\s?[:([]\s*regex101.com/r/Oj3w8o/1