Forum Discussion
Yaoxie_117356
Jul 12, 2016Nimbostratus
findstr irule
when RULE_INIT { set static::payload {windows-passwordusernamejackdomainTESTpasswordabcdef}
set username [findstr [findstr [findstr [$static::payload] {username} 1 "} 1 "} 7 "
}
any idea why the irule is not working?
Jul 12 17:33:27 apm err tmm[17407]: 01220001:3: TCL error: /Common/finstr - invalid command name "windows-passwordusernamejackdomainTESTpasswordabcdef" while executing "$static::payload"
Many thanks
- Yann_Desmarest_Nacreous
Hi,
You may need to use
instead of"
to define the{
:static::payload
when RULE_INIT { set static::payload "windows-passwordusernamejackdomainTESTpasswordabcdef" set username [findstr [findstr [findstr [$static::payload] {username} 1 "} 1 "} 7 "
- Yaoxie_117356Nimbostratus
Still same, i was referring from https://clouddocs.f5.com/api/irules/findstr.html
 
when RULE_INIT { set static::payload {} set static::term {">} set urlresponse [findstr $static::payload URL= 4 $static::term] log local0. "urlresponse $urlresponse" }
- Yaoxie_117356Nimbostratus
fixed, there was an additional []
findstr [$static::payload]
After remove it worked fine.
- Yann_Desmarest_Nacreous
This irule is working fine for me on a v12.1.0 lab env
Hi,
You may need to use
instead of"
to define the{
:static::payload
when RULE_INIT { set static::payload "windows-passwordusernamejackdomainTESTpasswordabcdef" set username [findstr [findstr [findstr [$static::payload] {username} 1 "} 1 "} 7 "
- Yaoxie_117356Nimbostratus
Still same, i was referring from https://devcentral.f5.com/wiki/irules.findstr.ashx
when RULE_INIT { set static::payload {} set static::term {">} set urlresponse [findstr $static::payload URL= 4 $static::term] log local0. "urlresponse $urlresponse" }
- Yaoxie_117356Nimbostratus
fixed, there was an additional []
findstr [$static::payload]
After remove it worked fine.
This irule is working fine for me on a v12.1.0 lab env
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects