0

I am creating a terminal based python application whereby the user drags and drops a csv file into the terminal to get the file path. The file path is therefore escaped.

How do I remove all instances of this?

For example, I have a file

thisisatestfile/\(2).csv

but when I drag it into terminal it appears as:

thisisatestfile\:\\\(2\).csv

I have a list of all the shell escape characters that I need to remove: link to characters

I am not very good at regex so any help much appreciated!

Itergator
  • 259
  • 1
  • 14

0 Answers0