Regexp
From SIPp
[edit]
Header multi-line
The following regexp permits to store a multi-line header. This regexp was written to cover a scenario need, where the Via header contents can evoluate depending of the scenario evolution and we needs to recall the first Via values.
<action> <ereg regexp="(Via.*)([[:cntrl:]][[:cntrl:]]Via:[^[:cntrl:]]*)" search_in="msg" check_it="true" assign_to="1,2,3" /> </action>
How it works
- $2 match all Via till the last
- $3 match the last Via
- You have in $1 the entire multi-line Via
Cons
- The Via header must be a multi-line header, it don't works with a single line header.
