Help to parse multiline

Hi,

need help to Parse only id that contain (active: “1” ) in correct way

             id: "100",
                active: "0"

         },
               id: "101",
               active: "1"
         },
               id: "102",
                active: "0"

         },
               id: "103",
               active: "1"

         },
                id: "104",
                active: "0"

         },

You should write a regex to do this

1 Like

can you give me correct regex

If it doesn’t work, enable the multiline checkbox in the parse block.

2 Likes

thanks for help,

its working perfectly only with two lines, but not Recursive in 3 or more lines

like this:
id: “100”,
title: “one”,
active: “0”

     },
           id: "101",
          title: "two",
           active: "1"
     },
           id: "102",
            title: "three",
            active: "0"

I updated the regex to take the title into account, if there’s any more fields just add another part to the regex like I just did (between round brackets and with a question mark at the end to make it optional).

In case the link goes down here it is

id: "([0-9]+)",\s+(title: "([^"]+)",\s+)?active: "1"
2 Likes