Hi, There is a sub to handle the Type and Value.
sub parse_type_value_specifier {
my $tvs = shift;
my ($type, $value) = $tvs =~ /<(\w+)\s+(.*?)>/;
return $type, $value;
}
It should suit for three formats below.
<B 0> - works, return $type = (B) and $value = (0)
<A[1..80] ""> - doesn't work, need return $type = A[1..80] and $value = () # empty
<A[1..80] "hello"> - doesn't work. need return $type = A[1..80] and $value = (hello)
/<(\w+)\s+(.*?)>/
Thank you.