Forum Discussion
Robert_47833
Aug 18, 2011Altostratus
how to match string1?string2?
there is a string start with /cjj?cjj2,how to match it?
if{
$uri matches_regex "^/cjj?cjj2"
}
{ persist none
HTTP::redirect "http://www.stubhub.com/404.html"
}
does "?" can be matched in matches_regex?
or do we have other method to achieve this?
- Kevin_Davies_40Nacreous
if { $uri starts_with {/cjj?cjj2} } { { ... rest of code } }
- Robert_47833AltostratusIf I insist on using match_regex,
- Kevin_Davies_40NacreousSure if you put a \ in front of the ? otherwise it represents any non-whitespace character. Its worth noting that any regex matching is significantly slower that's why there are many alternatives.
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