It is necessary to remove commas only inside quotes "". There is a file with many lines of this type (First Name, Last Name, Company, "Head of Product Development, Casino", Email, Phone Numbers, Notes, Tags) There is a regular-expression, but everything that is in quotes "[^"] is deleted * "

  • one
    It is better to use PythonScript (if you do this in Notepad ++) - editor.rereplace(r'"[^"]+"', lambda x: x.group().replace(",", "")) . In general, better use the normal programming language for this (Perl, Python, C #, ...). - Wiktor Stribiżew
  • one
    Thank! I installed the PythonScript plugin in notepad ++ started a regular expression and it worked. - Alexandr Polishchyk

1 answer 1

You can use your regular expression in a PythonScript script, where a match can be further processed in a lambda expression.

  • Install PythonScript
  • Click Plugins -> Python Script -> New Script
  • Create a comma_removal.py file
  • Add a line to the file

 editor.rereplace(r'"[^"]+"', lambda x: x.group().replace(",", "")) 

Now you can run the script from the menu Plugins -> Python Script -> Scripts -> comma_removal