Remove Links codes or short links, in a TagCloud

Hi guys, I hope you can help me in this awesome community, I have trouble visualizing a Wordcloud, I ingested the data and is indexed however I found short links pattern in the text that has 10 characters long in the TagCloud Visualization, what is the best way to avoid this happen?
I'm pointing my objective as a way to add these patterns as stopwords, I don't want these short links codes in my Tagcloud, this matter is about how the mapping is constructed?
I'm looking for a way to prevent this in the future
I expect a way to automate this with regex somehow I think it parts from there
I use Python to ingest data
data are text from Tweets.

Is there data which you can use in those containing the ID's? If not, and the only thing to go off of is that it's 10 characters long - you could use a scripted field to return 0 or 1 if it's 10 characters to easily search based on that.