Forum Discussion
lstewart_53611
Nimbostratus
Apr 29, 2010regex error - help?
I'm getting an error when trying to use the matches_regex operator. I think I might be using regexes that would work in perl but not in TCL. Can anyone see what's wrong with this? This is at the en...
hoolio
Cirrostratus
Apr 29, 2010Try wrapping the regex in curly braces to prevent the square braces in the character class from being interpreted as commands. Also, I don't think you don't need to escape the forward slashes in this.
if { ! ( $urivar matches_regex {^.*?/1/Kingdoms/users/[a-zA-Z0-9]} ) } {
That said, I think you can do this much more efficiently with a scan command:
http://www.tcl.tk/man/tcl8.4/TclCmd/scan.htm
Aaron
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