So I'm attempting to clean up a text file that I have (it is actually a region file which can be loaded into the astronomy fits viewer DS9). I would like to remove/delete the entirety of any line/(s) which contain the keyword "red" in them, for an example:
image;circle(2384.21957861,231.579450647,10.3410929712) # color = red text = {24}
Would anyone know how this could be accomplished within python?