The first part of your regular expression would only match:
f3333
And therefore replace 3333 with 1. Also, you haven't mentioned the %labels hash but used it in regexp.
Your regexp can be made more specific and changed to:
$formula=~s/([0-9]{4})/$Hidlabels{$1}/g;
In reply to Re: help required for regexp
by sumeetgrover
in thread help required for regexp
by upaksh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |