Forum Discussion
Raymond_Feng_97
Jul 31, 2012Historic F5 Account
urgent: need help for regular expression ?
Hi, all
Sorry , I am on site , can anybody help to create one line simple iRule to get the FQDN from the below sip string ?
ECSCF-Simulator7.P-LRF.com;lr>
Route: ECSCF-Simulator7.P-LRF.com;lr>
Contact: sip.test-site2.ERICSSON2.com:5060>
the fqdn is after "sip:" and "@" (if exist") and before ":" or ";"
I want to set the fqdn to one value and do dns query for this domain name , and then change change the destination ip to be that address.
Thanks.
Raymond
- hooleylistCirrostratusHi Raymond,
- Raymond_Feng_97Historic F5 Account
Route: Contact:
- hooleylistCirrostratusCan you post a few more examples of the two different header values?
- Raymond_Feng_97Historic F5 AccountSure I can using separate logic for Route and contact , actually my question is focus the FQDN may or may not have "@" .
Contact: Contact: Contact: Contact:
- hooleylistCirrostratusThe last regex didn't render correctly. And as TCL advanced regexes don't support lookbehinds, the regex won't work. You can do two scan commands for this though:
when RULE_INIT { Loop through some test strings: foreach str [list {} {} {} {} {} {}] { Scan assuming a format of
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