I had to change a lot, but this keeps the intent. This is from a PANOS firewall. The problem is that I am trying to find the objects in this list. However, some objects have double quotes to show there are spaces in the name of the object and some do not. I’m not sure how to clean this since NQE natively does not use double quotes to designate a single object that happens to contain spaces.
sampleInput = """
policy {
shared;
panorama {
address-group {
THE-GRAPE-Subnets {
static [ "Green Grapes Are Good" RedGrapes BlackGrapes "Wine Grapes" PurpleGrapes];
tag GRAPES;
description "This is a list of Grapes";
}
""";
pattern01 = ```
policy
panorama
address-group
THE-GRAPE-Subnets
static "[ {object: (string*)}
```;
foreach x in [1]
let config = parseConfigBlocks(OS.PAN_OS, sampleInput)
foreach match in blockMatches(config, pattern01)
select {
objects: match.data,
block: match.blocks
}Then this is the result from the “objects” column.
{object:["Green, Grapes, Are, Good", RedGrapes, BlackGrapes, "Wine, Grapes", PurpleGrapes]"]}
How can we get this to be a list of only 5 objects like it was in the sampleInput?





