For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Christian_Meiss's avatar
Christian_Meiss
Icon for Nimbostratus rankNimbostratus
Jul 18, 2016

string varialbe within STREAM::expression leads "illigal argument" error

Hi Folk,

i actually write an iRule to rewrite stream. The irule uses the advantages datagroup lists to dynamically build the regex replace pairs.

I now build a string var "$regexreplace" which i want to use within STREAM::expression

STREAM::expression {[string trim $regexreplace " "]}

But these line produces an error like this:

Jul 18 14:52:03 bigip-1-prod-01 info tmm1[16928]: Rule /Common/Substitute : VS=/Common/rva-ocsp-test-02_730_EP_vs, Host=certtest.bnotk.de, URI=/crls/: try STREAM::expression {@foo@bar@ @bla@fasel@ }
Jul 18 14:52:03 bigip-1-prod-01 err tmm1[16928]: 01220001:3: TCL error: /Common/Substitute  - Illegal argument (line 1)     invoked from within "STREAM::expression {[string trim $regexreplace " "]}"

The first line show a log output where variable $regexreplace is interpreted right. In second line you see the error.

What is going wrong?

Cheers

Christian

1 Reply

  • Hi, just remove curly braces and I think it works.

    STREAM::expression [string trim $regexreplace " "]

    Regards.