Forum Discussion

2funky_105078's avatar
Dec 19, 2017

iRule Remove char in a string

hello,

If I use this command:

set COUNTRY ([whereis [IP::client_addr] country]])

It gives me back a country in parentheses like (IT) ......

How can i remove this parentheses ( and )?

I tried to use the string trim or map command, but did not succeded.

Any hint?

Thanks

1 Reply

  • to remove parentheses from the result of:

    set COUNTRY ([whereis [IP::client_addr] country]])
    

    remove it from the command:

    set COUNTRY [whereis [IP::client_addr] country]]