Forum Discussion
James_Yang_9981
Altostratus
Nov 14, 2007How can I using strings that contains "$"
HI
maybe a basic question about TCL. I have a special application that insert http header like below:
GET /snoop HTTP/1.1
Host: 122.138.13.143
Connection: Keep-Alive
...
Yep, so for any exact match like /petfriendshhop/, you'd add it to the exact match datagroup and use the equals operator. For a URI token that has a * on the end, you'd add it without the * to a "starts_with" datagroup and use the "starts_with" operator on class match. Similarly, if you had ends_with checks you wanted to do, you could use the same logic as starts_with. If you need to support wildcards in the middle of strings in the datagroup, you'd need to retrieve the entire datagroup as a TCL list using 'class get' and then loop through the entries one by one using 'string match'.
Aaron