Regex 如何捕获第一个“之前的空白”;{“在数据中?”?

Regex 如何捕获第一个“之前的空白”;{“在数据中?”?,regex,Regex,您好,我正在尝试为以add开头的每一行捕获第一个{之前的第一个空格: add {"id":1,"last":"Doe","first":"John","location":{"city":"Oakland","state":"CA","postalCode":"94607"},"active":true} add {"id":2,"last":"Doe","first":"Jane","location":{"city":"San Francisco","state":"CA","postalC

您好,我正在尝试为以
add
开头的每一行捕获第一个
{
之前的第一个空格:

add {"id":1,"last":"Doe","first":"John","location":{"city":"Oakland","state":"CA","postalCode":"94607"},"active":true}
add {"id":2,"last":"Doe","first":"Jane","location":{"city":"San Francisco","state":"CA","postalCode":"94105"},"active":true}

   {(?<=\W) 
添加{“id”:1,“last”:“Doe”,“first”:“John”,“location”:{“city”:“Oakland”,“state”:“CA”,“postalCode”:“94607”},“active”:true}
添加{“id”:2,“last”:“Doe”,“first”:“Jane”,“location”:{“city”:“San Francisco”,“state”:“CA”,“postalCode”:“94105”},“active”:true}

{(?使用模式
{(?Try
(?这是实际数据添加{“id”:1,“last”:“Doe”,“first”:“John”,“location”:{“city”:“Oakland”,“state”:“CA”,“postalCode”:“94607”},“active”:true}添加{“id”:2,“last”:“Doe”,“first”:“Jane”,“location”:{“city”:“San Francisco”,“state”:“CA”,“postalCode”:“94105”},“active”:true}添加{“id”:3,“last”:“Black”,“first”:“Jim”,“location”:{“city”:“Spokane”,“state”:“WA”,“postalCode”:“99207”},“active”:true}添加{“id”:4,“last”:“Frost”,“first”:“Jack”,“location”:{“city”:“Seattle”,“state”:“WA”,“postalCode”:“98204”},“active”:false}获取{“location”:{“state”:“WA”},“active”:true}获取{“id”:1}获取{“active”:true}@你能用正确的字符串格式更新这个链接吗?
( ){(?<=^add {)
^add( ){
(?<=^add) (?={)