Relative Content

Tag Archive for pythonregexpycharm

Regex to remove all comments from python file and not break it

ChatGPT likes to add comments in the provided code, but they distract me. I copy – paste code inside Pycharm and delete them. I would like to have regex, which I could specify in find and replace IDE input and remove comments. I want at least regex to delete single-line comments.