Imports System.Text.RegularExpressions Imports System.Text Imports System.IO Public Class Form1 Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Dim all As String = File.ReadAllText("C:\a.txt", Encoding.GetEncoding("Shift_JIS")) Dim sb As New StringBuilder() For Each line As String In Split(all, vbNewLine) If String.IsNullOrEmpty(line) Then Continue For Dim cols() As String = line.Split(","c) If UBound(cols) >= 2 AndAlso cols(2).Length = 6 Then cols(2) = Mid(cols(2), 1, 2) & "/" & Mid(cols(2), 3, 2) & "/" & Mid(cols(2), 5, 2) End If sb.AppendLine(Join(cols, ",")) Next File.WriteAllText("C:\a.txt", sb.ToString(), Encoding.GetEncoding("Shift_JIS")) End Sub End Class