Ad Widget

Collapse

LLD and Regexs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • whmcr
    Junior Member
    • Jul 2012
    • 1

    #1

    LLD and Regexs

    I have a discovery rule using "vfs.fs.discovery" for the key. I need to be able to strip the trailing \ on the returned value, as I'm trying to create items such as perf_counter["\logicaldisk(C\% Disk Write Time"] and the vfs.fs.discovery returns C:\, which obviously won't work as the perfcounter doesn't exist.

    Is there a way to strip out the last character, or to use a regex to extract the first few chars (for example \w: )?
Working...