For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

jgranieri's avatar
jgranieri
Icon for Nimbostratus rankNimbostratus
Jul 29, 2015

Need to apply regex to a variable

Hello,

I have a need for regex to find the 2nd occurrence of a character and capture the data until the end. I tested my regex here and confirmed this regex will do what I need it to "[^@]+$". My issue is that when I test this via a simple irule the TCL regex doesn't seem to work at all. Any pointers would be great.

when CLIENT_ACCEPTED {
    set $Login "jeff@test1@bank1" 
    log local0. "TC login string is: $Login"
    set Result {regexp /[^@]+$/ $Login}
    log local0. "This is the parsed data $Result"
}

Expected result = bank1

No RepliesBe the first to reply