Ohh my bad. I corrected G with \G but still no chnage
print "Weights are : $1 Kg\n" while $x=~/\G(\d+)\s*kg\s*/ig; #print -1
prints nothing. Still not sure what difference it was supposed to make. NO issues if you don't have much experience to share with this. I will try reading about it more.
Thanks for your help.
In reply to Re^4: Regular expression
by pravakta
in thread Regular expression
by pravakta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |