Forum Discussion

Stephan_Manthe1's avatar
Stephan_Manthe1
Icon for Nimbostratus rankNimbostratus
Sep 08, 2014

Using regex in policy rule condition

Hi,

I´m trying to convert an httpclass to a policy rule. As a condition I need a regular expression, i.e.
conditions {  
    0 {  
        http-uri  
        values { '^/[0-9]{6}$' }  
    }  
    ...  

(example matches a uri containing of exactly 6 numeric characters).

I´ve looked up the documentation but didn´t find anything.

AskF5 SOL14409 describes an approach which simply results in "contains" or "starts/ends_with" matching.

And the approach above does not match. (Btw, fixed pattern matching is working fine.) Any ideas what I´m doing wrong, please?

Thanks a lot in advance,

Stephan

2 Replies