Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-6155

vfs.file.regexp can't return matched substring

XMLWordPrintable

      Hi,

      according to the documentation, 'vfs.file.regexp' should return matched string only. But if i try anything, i'm always getting the whole line where the matched string is.

      file content:
      11.36 10.95 9.49

      pattern:
      ^([0-9\.]+)

      result:
      11.36 10.95 9.49

      expected result (first 'word'):
      11.36

      I tried the pattern with python and it looks like it's working fine:

      >>> import re
      >>> re.findall("^([0-9\.]+)", "11.36 10.95 9.49")
      ['11.36']

            martins-v Martins Valkovskis
            azurit azurIt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: