Replace CSS block of text within file Python
问题 I'm tying to make a python program to help me make simple edits to a config file. I want to be able to read the file, replace a section of the file and then write the changes. One of the problems i have been having is that there are multiple lines that are the same. For example the config file looks like: /* Panel */ #panel { background-color: black; font-weight: bold; height: 1.86em; } #panel.unlock-screen, #panel.login-screen { background-color: transparent; there are two lines that contain