Ad Widget

Collapse

Pre-Proccessing With Regex

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ricofranco
    Junior Member
    Zabbix Certified Specialist
    • Oct 2016
    • 8

    #1

    Pre-Proccessing With Regex

    Hello,

    Cany anybody help me to get the info below with REGEX :

    I need to get the first value of thus OIDs (-1651.70 and 143.26)
    SNMPv2-SMI::enterprises.2011.5.25.31.1.1.3.1.32.67485774 = STRING: "-1651.70,-1600.33,-1619.79,-1505.85"
    SNMPv2-SMI::enterprises.2011.5.25.31.1.1.3.1.33.67485774 = STRING: "143.26,135.48,125.42,125.51"

    I´m using the regex: ^([-+]?[0-9].*\.[0-9]{1,2}) that I tested with regex101 site and reach Ok but into Zabbix I don´t got anything .
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    Hi, how about just like

    Code:
    ˆ(.*?),
    (The ? is to limit matching to the first value, otherwise PCRE is greedy in matching)

    How are you using it exactly?

    Markku

    Comment

    • ricofranco
      Junior Member
      Zabbix Certified Specialist
      • Oct 2016
      • 8

      #3
      Hello, thanks for your suggestion , I solved this issue with the REGEX:

      ^([-+]?[\d]{1,4}\.[\d]{2})\b(.*)

      Comment

      Working...