$variable = '12345(checkthis)'; $digit=$1 if $variable=~m#([0-9]+)#; print $digit;
Output:
12345
In reply to Re: what is the best way to seperate the digits and strings from variable ?
by gopalr
in thread what is the best way to seperate the digits and strings from variable ?
by swaroop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |