Forum Discussion
DaveC_21078
Altostratus
Aug 27, 2009How can I chab=nge the format of a URL?
I need to be able to search for a URL similar to
http://example.com/adserver/impression/pid=123/oid=860/rand=12345/?click=http://www.publisher.com/track/ad.aspx?click=1&test=2&imp=1
...
hoolio
Cirrostratus
Sep 01, 2009The scan command is expecting a (set of) digit characters. So you could change the scan to match any character which is not a / instead:
if { [scan [HTTP::uri] "/adserver/impression/pid=%s/oid=%s/rand=%s" pid oid rand] == 3 } {
to:
if { [scan [HTTP::uri] {/adserver/impression/pid=%[^/]/oid=%[^/]/rand=%[^/]} pid oid rand] == 3 } {
Note the use of curly braces to prevent the [ ]'s from being interpreted as TCL commands.
Aaron
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