×

Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

LUA string.

Unanswered Question
Jan 15th, 2014
User Badges:

Hello,

       I am trying to evaluate version values of registry keys with LUA.

Numerous examples use string.find function.

I try to use string.match in something like :


local version_max = 28
version_string=string.match(match_value, '^%d+')

to extract the first part of the version numbver registry key.


This works fine in LUA interpreters (like http://www.lua.org/cgi-bin/demo) but not in Cisco DAP editor.


The error message is:


DAP_ERROR: Username: overlap, dap_select_records: Error running get_selected_daps:
       [string "return ((EVAL(aaa.cisco.tunnelgroup,"EQ","R..."]:5: attempt to call field `match' (a nil value)
DAP_ERROR: Username: overlap, ak47_new_stack_call failed in dap_request
DAP_ERROR: Username: overlap, ERROR selecting DAP records
DAP_TRACE: Username: overlap, Action set to terminate
DAP_TRACE: Username: overlap, DAP_close: 73A200D0


Which makes me think string.match function is not available in Cisco LUA interpreter.


Is anyone knows if this function is available ?

Is anyone knows the list of available LUA functions ?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.

Actions

This Discussion