如果文件的第 3 列包含字符串“BMR”,我想删除该文件,字符串可能是 - “BMR13234”,这意味着“BMR”是该字符串的静态部分,它可以包含任何其他字符。
因此,如果第 3 列包含 -“BMR*”(* 指任何字符),则应从文件中删除整个第 3 列。
例如: 输入:
"ABC","0.20","BMR1234442","2001-01-01"
"LMN","0.00","BMR2490289","2008-01-01"
"LTD","0.20","BMR2345577","2001-01-01"
输出应为:(仅当存在 BMR 时,否则不应删除第 3 列)
"ABC","0.20","2001-01-01"
"LMN","0.00","2008-01-01"
"LTD","0.20","2001-01-01"
请建议。