Search code examples
pythonpycharm

Make Pycharm treat single and double quotes the same in searches


I'm working on some code which is partly my own and partly copied from a colleague's program. When accessing dictionaries I usually use example["key"] whereas he usually uses example['key'], I'm refactoring some code and while pycharm has an excellent search and replace function it treats single and double quotes separately which is A) inconvenient and B) means there is a good chance of me missing some code.

Does anyone know if there is a way to get Pycharm to treat single and double quotes the same for the purposes of find and/or search and replace i.e. so a search for dictionary['hello_world'] would find both dictionary['hello_world'] and dictionary["hello_world"].

Thanks


Solution

  • You can use regex in search box ".*" and operator OR with symbol "|":

    enter image description here

    Thank you