rindex($UserName, get_var('char')))

Tags:

#1 Brandon.Mixon

Hey all, 

I was wondering if rindex worked on nxlog, I’m not having luck getting it to work, and all my searches come up empty. I’m looking to parse a username after a "|" 

create_var('char'); \
set_var('char', '|'); \
create_var('index_num'); \
set_var('index_num', rindex($UserName, get_var('char'))); \

#2 adm Nxlog ✓
#1 Brandon.Mixon
Hey all,  I was wondering if rindex worked on nxlog, I’m not having luck getting it to work, and all my searches come up empty. I’m looking to parse a username after a "|"  create_var('char'); \ set_var('char', '|'); \ create_var('index_num'); \ set_var('index_num', rindex($UserName, get_var('char'))); \

rindex() is not available currently. Perhaps this could be done using a regexp?

Another option is to use xm_perl and write some perl code to do what you need.