I have the following string patterns:
A = 'this is an_example-0--1.5-60-NA'
The separator is a hyphen but there are mixed positive/negative numbers. I want to extract the following strings:
string[0] = 'this is an_example'
string[1] = -1.5
string[2] = 60
string[3] = 'NA'
string[1]
and string[2]
can be either positive or negative. string.split('-')
doesn't work here.