ends_with

Description

Tests if one string ends with another string.

Syntax

<string1> ends_with <string2>

<string1> ends_with <string2>

  • Tests if string1 ends with string2.

Equivalent to the TCL string match command:
string match *string2 string1

Examples

when HTTP_REQUEST {
  if { [HTTP::uri] ends_with ".gif" } {
     pool my_pool
  } elseif { [HTTP::uri] ends_with ".jpg" } {
     pool your_pool
 }
}