Forum Discussion
Nicolas_MENOUX_
Nimbostratus
Nov 23, 2009regexp and # issue
Hi,
I'm trying to reload my bigip.conf file from my v9.3 appliance to the new v10 release but I'm stucked with a bracket issue with my conf file.
After analysing the file, I've discovered that this line is faulted :
} elseif {[regexp {^/foo-([^\.]*)-m([0-9]+)([0-9]+).html} $uri url param1 param2 param3]} {set uri_rewrite "/foo/Default.aspx?g=posts&m=$param2&boardid=5&$param3"
The issue is coming from the first between ([0-9]+)([0-9]+). I think it is treated as a comment and thus the bracket pb.
I've tried to put a \ before but nothing changes. Is there any way to replace this with an encoded sequence or use another special character to prevent this from being a comment.
Thanks for your help,
Regards
3 Replies
- The_Bhattman
Nimbostratus
Hi Nicolas,
Try creating a variable and then passing the variable to the regexp to see if that works.
Bhattman - hoolio
Cirrostratus
You could try replacing the curly braces with quotes and then escaping the square braces:if {0}{ do something } elseif {[regexp "^/foo-(\[^\.\]*)-m(\[0-9\]+)(\[0-9\]+).html" $uri url param1 param2 param3]} { do something }
Aaron - Nicolas_MENOUX_
Nimbostratus
Hi Aaron and Bhattman
thanks for your help, I've just tried the double quotes instead of curly braces and it works well ! I do not remember why I originaly used these curly braces, I think it was linked with some regular expression in my stream matched irules where I could not use the double quote .... I've to study again the regexp syntax ... anyway thanks a lot ;-)
Nicolas
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
