Syntactic Confectionery Delight | |
PerlMonks |
Regex problemby dazz (Beadle) |
on May 25, 2017 at 09:35 UTC ( [id://1191188]=perlquestion: print w/replies, xml ) | Need Help?? |
dazz has asked for the wisdom of the Perl Monks concerning the following question:
Hello I download a web page that includes data used and remaining data for a mobile connection. I want to find the two values and convert them from strings to values. A snippet of the html page is: I use the regex to get a matching substring with the 1st value within The output in $stgUsed is what I expect: In want to capture just the number (315) and the units (MB) but $DataUsed in undef. I have tried using $1,$2 ... but they are undef as well. How to I get the digits substring and the MB/GB substring???? Dazz
Back to
Seekers of Perl Wisdom
|
|