I have events in json format need to extract number from this sip:+firstname.lastname@example.org
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
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
You can try this,
| fields - _time
| eval data="sip:+firstname.lastname@example.org"
| rex field=data "sip\:\+(?P<Routing_Number>.*)\@"