Ad Widget

Collapse

Extract data from SNMP anwer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nicolasfo
    Member
    • Jul 2015
    • 56

    #1

    Extract data from SNMP anwer

    Hello there,

    For an UPS, I get a SNMP anwser like 00010100000000000010000000000000000000000000000000 00000000000000

    How do I extract, on the fly, for example, the fourth digit (wich can be "0" or "1") of this chain ?

    Thanks in advance

    Nicolas

  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    Try the preprocessing tab, regex /...(\d)*/ and output \1

    No guarantee... :-)
    Last edited by LenR; 09-11-2018, 17:56. Reason: Should be 3 periods in regex for the 4th position, browser keeps "fixing" the post

    Comment

    • nicolasfo
      Member
      • Jul 2015
      • 56

      #3
      Hello,
      This regex did the job : (for the 21th caracter, for example)
      Code:
      .{20}(.).*
      Thanks
      Nicolas

      Comment

      Working...