The following snippet does the trick.
msg = "\"This is a quoted message\" - here is some more."
printf("before: %s",msg)
printf("after : %s", msg:gsub("\"",""))
----------- Executing script at 15.10.2009 08:48:50 ----------
before: "This is a quoted message" - here is some more.
after : This is a quoted message - here is some more.
In a spesific NAS pre-processing rule+script where the filter 'NimBUS Probename' is 'snmptd':event.message = event.message:gsub("\"","")
return event
In a general NAS pre-processing script:if event.prid == "snmptd" then
event.message = event.message:gsub("\"","")
end
return event
PS. You could also check out the lua string handling recipes here:
http://lua-users.org/wiki/StringRecipesCarstein