I am not getting how to split string.

```
a = ['hostname1-Link1-2582',
'hostname2_1/3/10',
'hostname100',
'hostanme250_1']

```

Above is my data. I want to capture if list item contains continuous numeric format after \_ or -. 

In this case I want to capture 2582 from hostname1-Link1-2582 this and 1 from hostanme250\_1 this.

where second list item and 3rd list item doesn't not have this format so i want to ignore those.

so i expect output should be like 

output = [2581,NA,NA,1]

could anyone please help me to split these data and store it into list.

I have tried like below:

```
 for i in a:
   i.split('-')[2]

```