TCL プログラミングの初心者で、入力ファイルから一致する行を削除したい
- まったく同じ行内容
- パターン:
"ghi\/\njkl\/\nrccu1" -> "Point \.*: 10 Sinks" \.*
(単語「ポイント」の後ろの数字と「[color.*
」の後ろのコンテンツは異なる場合があります - 他のすべては正確に一致する必要があります) "mno\/\npqr\/\nrccu1" -> "stu\/\nvwx\/\nrccu1" [label = "depth: 1"] [color=salmon] [fontcolor=salmon] [style=solid];
(単語「Point」の後ろの数字と「 」の後ろのコンテンツ[color.*
は異なる場合があります - 他のすべては正確に一致する必要があります)
今、私は次の入力ファイルを持っています
"abc\/\ndef\/\nrccu1" [形状=八角形,色=赤,スタイル=塗りつぶし]; "abc\/\ndef\/\nrccu1" [形状=八角形,色=赤,スタイル=塗りつぶし]; "ghi\/\njkl\/\nrccu1" -> "ポイント 1: 10 シンク" [color=salmon] [style=solid] [weight=8]; "123\/\n456\/\nrccu1" -> "ポイント 9: 10 のシンク" [色 = グレー] [スタイル = 固体] [重量 = 8]; "ghi\/\njkl\/\nrccu1" -> "ポイント 8: 10 のシンク" [色 = グレー] [スタイル = 固体] [重量 = 8]; "ghi\/\njkl\/\nrccu1" -> "ポイント 13: 20 のシンク" [color=grey] [style=solid] [weight=8]; "mno\/\npqr\/\nrccu1" -> "stu\/\nvwx\/\nrccu1" [label = "depth: 1"] [color=salmon] [fontcolor=salmon] [style=solid]; "mno\/\npqr\/\nrccu1" -> "stu\/\nvwx\/\nrccu1" [label = "depth: 4"] [color=salmon] [fontcolor=salmon] [style=solid]; "mno\/\npqr\/\nrccu1" -> "stu\/\nvwx\/\nrccu1" [label = "depth: 1"] [color=grey] [fontcolor=red] [style=solid];
出力ファイルには次が含まれている必要があります。
"abc\/\ndef\/\nrccu1" [形状=八角形,色=赤,スタイル=塗りつぶし]; "ghi\/\njkl\/\nrccu1" -> "ポイント 1: 10 シンク" [color=salmon] [style=solid] [weight=8]; "123\/\n456\/\nrccu1" -> "ポイント 9: 10 のシンク" [色 = グレー] [スタイル = 固体] [重量 = 8]; "ghi\/\njkl\/\nrccu1" -> "ポイント 13: 20 のシンク" [color=grey] [style=solid] [weight=8]; "mno\/\npqr\/\nrccu1" -> "stu\/\nvwx\/\nrccu1" [label = "depth: 1"] [color=salmon] [fontcolor=salmon] [style=solid]; "mno\/\npqr\/\nrccu1" -> "stu\/\nvwx\/\nrccu1" [label = "depth: 4"] [color=salmon] [fontcolor=salmon] [style=solid];