Forum Discussion
jgranieri
Nimbostratus
Jul 29, 2015Need 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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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