Forum Discussion
Simon_Jones_112
Nimbostratus
Sep 26, 2006Matching a GUID in a querystring?
Hi all,
Anyone tell me why this won't work? Is it possible to use \w's in an IRule?
set querystring URI::query
if { $querystring contains "productid" } {
Match the GUID in product and redirect it to the URL:
set productid [regexp -all -inline -indices {\w{8}-\w{4}-\w{4}-\w{4}-\w{12}} [HTTP::uri]]
Log to syslog-ng
log local0. "Found product: $productid"
}
Simon
- hoolio
Cirrostratus
If \w isn't working, you might try expanding it to [A-Za-z0-9]. I'm not sure which regex library is used, but this might be a valid workaround. - Simon_Jones_112
Nimbostratus
Thanks, almost there with this.
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