2014-02-13 2 views
0

매우 큰 json 파일을 생성했으며 중복 필드가 생성되었음을 알았습니다. 이 파일들을 모두 다시 출력하는 것보다는 (매우 긴) 메모장 ++ 찾기 및 바꾸기 기능을 사용하여 필요에 따라 편집 할 수 있다면 도움이 될 것이라고 생각합니다.중복 항목 찾기 및 바꾸기 메모장 ++

내 JSON 필드는 다음과 같습니다 :

{ 
"PlayerID":44, 
"CurrentTeam":"WAS", 
"Number":95, 
"CurrentAuctionValue":2, 
"CurrentAuctionValue":0, 
"LastPlayedPoints":0 
}, 
{ 
"PlayerID":11, 
"CurrentTeam":"WAS", 
"Number":96, 
"CurrentAuctionValue":0, 
"CurrentAuctionValue":0, 
"LastPlayedPoints":0 
}, 

다행히 JSON 내 생성 코드는 항상 두 번째 CurrentAuctionValue 0을 만드는하지만이 필드가 필요하지 않습니다. 나는 편의상 그걸 없애고 싶다. 경매 값이 0 일 수는 있지만 첫 번째 CurrentAuctionValue 만 중요합니다. 여러 줄을 검색하고 바꿀 수있는 방법이 있습니까?

는 기본적으로 "코드"형식으로 내가하고 싶은 :

Find: "CurrentAuctionValue":%d,\n"CurrentAuctionValue":0,\n 
Replace: "CurrentAuctionValue":%d,\n 

내가 메모장의 검색 기능과 재생 해봤지만 성공을 거둘수 없다. 다른 방법에 대한 제안은 환영합니다!

답변

1

검색 모드 : Regular expression

무엇을 찾기 : ("CurrentAuctionValue":\d+),\r\n"CurrentAuctionValue":0,

가 교체 : 완벽 $1

enter image description here

+0

작품. 정말 고맙습니다! – ZAX