cancel
Showing results for 
Search instead for 
Did you mean: 

TCL function (regexp and regsub function only don partial)

TCL function (regexp and regsub function only don partial)

Helpme
New Contributor
XOS 15.5.2.9 patch1-5

set var a "12345:54321:7806"

set var x $TCL(regexp -all {([0-9]*):([1-5]{5}):([0-9]{1,4})} $a match s1 s2 s3)

show var

----------------------------------------
Count : 5
----------------------------------------

------------------------------------------------------------------
variableName variableValue
-------------------------------- --------------------------------
a 12345:54321:7806
CLI.SESSION_TYPE telnet
CLI.USER admin
STATUS 0
x 1

Form display i can't get match, s1, s2 and s3 variable

Is this a bug

set var y $TCL(regexp -all {:} $a / s4)

30B-01.10 # show var
----------------------------------------
Count : 6
----------------------------------------

------------------------------------------------------------------
variableName variableValue
-------------------------------- --------------------------------
a 12345:54321:7806
CLI.SESSION_TYPE telnet
CLI.USER admin
STATUS 0
x 1
y 2
------------------------------------------------------------------

Form above show var result why i can get match variable content

is this another bug

if that are bugs please quickly correct ...........

5 REPLIES 5

Paul_Russo
Extreme Employee
Hello Helpme

Can I ask what your end goal is? I don't see where variables S1 S2 S3 are defined.

Thanks
P
GTM-P2G8KFN