Hi ,
Below is my field "rtpmap:8 PCMA/8000,rtpmap:101 telephone-event/8000,ptime:20" I would like to get ptime from this , which is 20 . But sometimes i have the field coming as maxptime instead of ptime
Please help
Thanks,
Swathi
Hi
Give a try
| makeresults
| eval msg="rtpmap:8 PCMA/8000,rtpmap:101 telephone-event/8000,maxptime:20"
| makemv delim="," msg
| rex field=msg "(ptime:|maxptime:)(?P<ptime>\d+)"
Why not just use extract?
| makeresults
| eval _raw="rtpmap:8 PCMA/8000,rtpmap:101 telephone-event/8000,maxptime:20,ptime:20"
| extract pairdelim=",", kvdelim=":" mv_add=t
This is the below error : 'ptime:(?\w+)': Regex: unrecognized character after (? or (?-
Hi
Give a try
| makeresults
| eval msg="rtpmap:8 PCMA/8000,rtpmap:101 telephone-event/8000,maxptime:20"
| makemv delim="," msg
| rex field=msg "(ptime:|maxptime:)(?P<ptime>\d+)"
Awesome!!
@veeruswathi
try this:
| makeresults | eval test="rtpmap:8 PCMA/8000,rtpmap:101 telephone-event/8000,ptime:20" | rex field=test "ptime:(?