В настоящее время я делаю некоторые ежедневные настройки, исходный файл автоматически конвертируется из .csv в .dat. Поэтому файлы .dat будут содержать много нежелательных символов, которые я должен удалить вручную. У меня вопрос, есть ли способ удалить его автоматически?
Это сценарий:
Don'tRemoveThisPipe | Don'tRemoveThisPipe | Don'tRemoveThisPipe | Don'tRemoveThisPipe | ButRemoveThesePipe |||||||||||||||||||||||||||||| ||||||||||
Don'tRemoveThesePipe ||| Don'tRemoveThisPipe || Don'tRemoveThisPipe | Don'tRemoveThisPipe | ButRemoveThesePipe |||||||||||||||||||||||||||||| ||||||||||||||||||||||||||||||
Don'tRemoveThisPipe | Don'tRemoveThisPipe | Don'tRemoveThisPipe | Don'tRemoveThisPipe | ButRemoveThesePipe ||||||||||||||||||||
Don'tRemoveThesePipe ||| Don'tRemoveThisPipe || Don'tRemoveThisPipe | Don'tRemoveThisPipe | ButRemoveThesePipe |||||||||||||||||||||||||||||| ||||||||||||||||||||||||||||||||||||||||
Я попытался использовать выражение. + (/ |), Но оно удалит все символы канала, что не то, что я хочу.
https://drive.google.com/open?id=1bi4jOtLpRxvkrWvavr1lEMqZI8vKxHOB
Я ожидаю, что результат будет таким:
Don'tRemoveThisPipe | Don'tRemoveThisPipe | Don'tRemoveThisPipe | Don'tRemoveThisPipe | ButRemoveThesePipe
Don'tRemoveThesePipe ||| Don'tRemoveThisPipe || Don'tRemoveThisPipe | Don'tRemoveThisPipe | ButRemoveThesePipe
Don'tRemoveThisPipe | Don'tRemoveThisPipe | Don'tRemoveThisPipe | Don'tRemoveThisPipe | ButRemoveThesePipe
Don'tRemoveThesePipe ||| Don'tRemoveThisPipe || Don'tRemoveThisPipe | Don'tRemoveThisPipe | ButRemoveThesePipe