Hello! I'm trying to extract the numeric digits from a string which may contain both numeric and alpha characters. For example, <br><br>$wd = '16TH';<br>$tmp = index($wd, /[A-Z]/); # this doesn't work?<br>if ($tmp != -1){<br> $wd = substr($wd,0,$tmp);<br>}<br>but this does!<br>$wd =~ m/[A-Z]/g;<br>$t1 = pos $wd;<br>if ($t1 > 0){<br> $wd = $`;<br>}<br>I'm just wondering if regular expressions don't work for index. I know they work for split. What I don't like about the example that does work, is that if the string doesn't contain any alpha characters, $t1 is undefined? What am I missing here?<br>Thanks <br><br>Dabits