背景
对文本文件根据正则表达式进行数据清洗。
https://techcommunity.microsoft.com/t5/excel/parsing-text-usng-power-query/m-p/3861175
操作:
【在线sql数据清洗Parsing text-哔哩哔哩】 https://b23.tv/hPl1V81http://e.anyoupin.cn/EData/?s=Parsing
下面展示一些 内联代码片
。
cli_add_php~~
?><form method="post" action="?p=Tools/DisTbl&g=sql" id=fmMaster>sheet<input type="textbox" name="sheet" value="">
<input type="button" id="btnNext" οnclick="fmMaster.submit();" style="height:2em" value="filter">
</form>
<?php
$sql="create temp table aa as select fillna(regexp2('Purpose\s*=\s*(\w+)',f01,1)) sheet,regexp2('\|\s*(\d+)\|\s*(\d+)\|\s*([\d.]+)\|\s*([\d\.]+)',f01,1) `#`,regexp2('\|\s*(\d+)\|\s*(\d+)\|\s*([\d.]+)\|\s*([\d\.]+)',f01,2) Number,regexp2('\|\s*(\d+)\|\s*(\d+)\|\s*([\d.]+)\|\s*([\d\.]+)',f01,3) BLER,regexp2('\|\s*(\d+)\|\s*(\d+)\|\s*([\d.]+)\|\s*([\d\.]+)',f01,4) `Filt BLER`,* from Parsing_the_attached_txt_into_two_worksheets ;";
if(!empty($_POST["sheet"])){
$sql.="select * from aa where sheet like '%${_POST["sheet"]}%' and `#`!=''";}else{$sql.="select * from aa where sheet!='' and `#`!='' order by sheet";
}
\multiquery\multiquery_run($sql);
~;