Reporting

cdr analysis area code

HansK
Path Finder

Hi,

I have field which contains telephonenumbers and would like to create a report on area codes, so I need to only use the first 3 digits of the field.

How is this done?

Tags (2)
0 Karma
1 Solution

Ayn
Legend

Grab the first 3 digits - there are multiple ways to do this. Either you use eval and substr:

... | eval areacode=substr(yourphonefield,1,3)

Or you could use rex:

... | rex field=yourphonefield "^(?<areacode>\d{3})"

View solution in original post

Ayn
Legend

Grab the first 3 digits - there are multiple ways to do this. Either you use eval and substr:

... | eval areacode=substr(yourphonefield,1,3)

Or you could use rex:

... | rex field=yourphonefield "^(?<areacode>\d{3})"
Get Updates on the Splunk Community!

Database Performance Sidebar Panel Now on APM Database Query Performance & Service ...

We’ve streamlined the troubleshooting experience for database-related service issues by adding a database ...

IM Landing Page Filter - Now Available

We’ve added the capability for you to filter across the summary details on the main Infrastructure Monitoring ...

Dynamic Links from Alerts to IM Navigators - New in Observability Cloud

Splunk continues to improve the troubleshooting experience in Observability Cloud with this latest enhancement ...