How would you remove a reference number from a string, e.g.
text = "It is known that bananas are yellow [1] and tomatoes are red [2]."
output:
"It is known that bananas are yellow and tomatoes are red."
Would it be regular expressions or anything else?
EDIT: I don't see I could be more precise about the question. Thanks for the answer.