I have events in json format need to extract number from this sip:+email@example.com
example: i need +1234566 from this any regex exp for this ..... field name is "Routing-Number"
You can use this
rex field=_raw "sip:(?<RoutingNumber>\S+)@"
View solution in original post
You can try this,
| fields - _time
| eval data="sip:+firstname.lastname@example.org"
| rex field=data "sip\:\+(?P<Routing_Number>.*)\@"
Try this rex,
| eval test="sip:+email@example.com"
| rex field=test "sip:(?P<RoutingNumber>[^@]+)"
Try the above rex, which extracts the required string with a minimum steps