its replace was done again and again
$li ="abbjghfg table 1 vinoth figer table2"; $f=$li; while($f=~m /table[ ]([0-9])+|table([0-9])+|fig[ ][0-9]+|fig[0-9]+/i +) { $f = $'; #print " after ----$f \n "; $match_key=$&; #print " --match : --$match_key \n "; $front=$`; $rep=$front."<aid=".$match_key.$'; print" $rep \n"; }
output come
abbjghfg <aid=table 1 vinoth figer table2 vinoth figer <aid=table2
but i tried different ways but how to do like this i dont know
need like this abbjghfg <aid=table 1 vinoth figer <aid=table2
In reply to how to do replace more then one matches? by virudinesh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |