OK so occurence needs "" round the number. Sorted now.
From: Martin Hull <d.m.h...@btinternet.com>
To: "sipp-users@lists.sourceforge.net" <sipp-users@lists.sourceforge.net>
Sent: Tuesday, 10 October 2017, 16:40
Subject: [Sipp-users] identifying 2nd, 3rd .. nth contact headers
Hi I am struggling with the 'occurence' parameter in a regex. In my scenario I
will be receiving 2 Contact headers and I'm trying pick out the tgrp param from
both of them. For now, I'm just sticking them in a log file.
<recv response="300"> <action> <ereg
regexp=".*tgrp=(.*);trunk-context.*"search_in="hdr" header="Contact:"
occurence=1assign_to="1,2" /> <ereg regexp=".*tgrp=(.*);trunk-context.*"
search_in="hdr"header="Contact:" occurence=2 assign_to="3,4" /> <log
message="match 1: [$1]"/> <log message="match 2: [$2]"/> <log
message="match 3: [$3]"/> <log message="match 4: [$4]"/> </action> </recv>
In my log file, match 1 is the whole first contact and match 2 shows the tgrp
param. Match 3 is identical to match1 and match 4 identical to match 2. I have
tried many permutations on this but I can never match anything on the 2nd
contact header.
Can anyone help?
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org!
http://sdm.link/slashdot_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users