[英]Parsing unstructured data
Here is the data i need to parse : 这是我需要解析的数据:
Date Page impressions Clicks Page CTR Page eCPM Estimated earnings 2010-12-11 542 17 3.14% 7.13 3.87 Totals 542 17 3.87 Averages 542 17 3.14% 7.13 3.87
and i need to extract the last value 3.87. 我需要提取最后一个值3.87。 I know this can be done very easily using awk.
我知道可以使用awk轻松完成此操作。 But are there any solutions to convert this into an array based on the space seperation ?
但是,是否有任何解决方案可根据空间分隔将其转换为数组?
$arr = preg_split("/[ \\t]+/", $str);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.