다음과 같은 여러 줄이 있습니다.
{
"source": "Source A",
"target": "Source B",
"idTarget": "3,345",
"strength": "0.5",
"value": "633.5138"
}
{
"source": "Source C",
"target": "Source D",
"idTarget": "1,253",
"strength": "0.7",
"value": "5465.238"
}
.
단어가있는 줄에서 (점) 을 제거하고 value
싶지만 다른 줄 에는 제거하고 싶습니다 . 따라서 다음과 같이 보일 것입니다.
{
"source": "Source A",
"target": "Source B",
"idTarget": "3,345",
"strength": "0.5",
"value": "6335138"
}
{
"source": "Source C",
"target": "Source D",
"idTarget": "1,253",
"strength": "0.7",
"value": "5465238"
}
이 작업을 수행 할 방법이 있습니까?
^"value":[^.]+\K\.
LEAVE EMPTY
. matches newline
설명:
^ : begining of line
"value": : literally
[^.]+ : 1 or more not dot
\K : forget all we have seen until this position
. : a dot
주어진 예의 결과 :
{
"source": "Source A",
"target": "Source B",
"idTarget": "3,345",
"strength": "0.5",
"value": "6335138"
}
{
"source": "Source C",
"target": "Source D",
"idTarget": "1,253",
"strength": "0.7",
"value": "5465238"
}
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다