I have the next strings:
generation_1_2
generation_2_8
generation_3_12
How can I put digits from this strings in variables? For example:
$digit1[0] is 1.
$digit1[1] is 2.
$digit1[1] is 3.
$digit1[0] is 2.
$digit1[1] is 8.
$digit1[2] is 12.
Thanks for your help.