I have a text file of the type:

[...speech...]

NAME\_OF\_SPEAKER\_1: [...speech...]

NAME\_OF\_SPEAKER\_2: [...speech...]

My aim is to isolate the speeches of the various speakers. They are clearly identified because the name of each speaker is always indicated in uppercase letters (name+surname). However, in the speeches there can be nouns (not people's names) which are in uppercase letter, but there is only one word that is actually long enough to give me issue (it has four letter, say it is 'ABCD'). I was thinking to identifiy the position of each speaker's name (I assume every name long at least 3 letters) with something like

```
re.search('[A-Z^(ABCD)]{3,}',text_to_search)

```

in order to exclude that specific (constant) word 'ABCD'. However, the command identifies that word instead of excluding it. Any ideas about how to overcome this problem?