How to extract a string without using rex or erex?
Ex: I don't have clear logs for phone numbers, want to extract the phone number and then extract the country code from that field.
I'm able to extract the phone numbers. But not able to extract the country code, since i have phone numbers with 2 and 3 digit country codes.
I want to extract the first digits of above phone number. Here first number country code is 2 digits and second phone number has 3 digit country code.
I need Country codes like below:
Please suggest something on the above without using regex
@greeshmak - Did rich's answer below help you out? If yes, please don't forget to click "Accept" below his answer to resolve the question. If not, please leave a comment. Thanks.
... | eval cc=substr(pn,1,len(pn)-10) | ...