0
공백과 일부 숫자 사이의 텍스트를 새 출력으로 추출하려고 시도했습니다.
이것은 작업 노트의 입력 행입니다. 작업 노트 = John Smith 123456 11/22/3333 1 : 22 : 33 PM 654321repl.bat 공백과 숫자 사이의 여분의 텍스트
@echo off
set "input=before.txt"
set "output=after.txt"
findstr /r /i /c:"^Job Notes=" "%input%" |repl ".*=(.*) (\d+) (\d+\/\d+\/\d+) \d+:\d+:\d+ .*" "Name=$1\r\nFile Number=$2\r\nDate=$3" x >"%output%"
findstr /r /i /c:"^File Type=" "%input%" >>"%output%"
findstr /r /i /c:"^Location=" "%input%" >>"%output%"
현재이 출력이 표시됩니다.
Name=John Smith
File Number=123456
Date=dd/MM/yyyy
File Type=4
Location=3
이 출력 내가 그들에 공백이 성과 이름을 고려하여 숫자의 공간에서 모든 텍스트를 추출 할 필요가
Name=John Smith
Lastname=Smith
File Number=123456
Date=dd/MM/yyyy
File Type=4
Location=3
을 하시겠습니까.
감사