Publish time 2013-8-29 16:42:03

[2013.08.29]Using Regular Express to Get the Value from Win8.1(WHCK) System IQ Test

People can get the log file or htm report from WHCK, like below example
<td class="MsgInstance" width="72%" colspan="2"> Test=Luminance,Result=PASS,METRIC=LUMINANCE,Value=102,Expected=88-168,Bucketized_Error=0,Camera=USB2.0 Camera,Location=NotSet,Resolution=640x480,Lux=20<table width="100%"></table>

We use expresso to analysis the regular express rule to get the vale we need .
For example, I need to collect the IQ test vale of every test itmes, so I need get the parameter from the word - Test, Value, Expected, Resolution and Lux.

Below  conclustion list some perl regular express rule to realize my need, people can use ultraedit or expresso to test the result.

replace what---
pattern1:
.*Test=([^,]*),.*Result=([^,]+),.*METRIC=([^,]+),.*Value=([^,]+),.*Expected=([^,]+),.*Resolution=(+).*(Lux=+).*

pattern2:
.*Test=([^,]+),Result=([^,]+),METRIC=([^,]+),Value=([^,]+),Expected=([^,]+)[^<]+Resolution=([^,]+),(Lux=[^,<]+)<.*

pattern3:
.*Test=([^,]+),Result=([^,]+),METRIC=([^,]+),Value=(+),Expected=([-0-9\.]+),.*,Resolution=(+),(Lux=[^<]+).*

pattern4:
.*Test=([\w-\.]+).*Result=([\w-\.]+).*METRIC=([\w-\.]+),.*Value=([\w-\.]+),.*Expected=([\w-\.]+),.*Resolution=([\w-\.]+),.*(Lux=[\w-\.]+)<.*
(Because of regular express are not only Perl but POSIX RE  or Extended RE, the  w parameter of rule4 can't recongnize  by ultraedit Perl, it just could to be analysis by expresso.)

replace with---
TEST=,\1,Result=,\2,METRIC=,\3,Value=,\4,Expected=,\5,Resolution=,\6,\7

result---
TEST=,Luminance,Result=,PASS,METRIC=,LUMINANCE,Value=,102,Expected=,88-168,Resolution=,640x480,Lux=20



---------reference-------
http://www.ultraedit.com/support/tutorials_power_tips/ultraedit/perl-regular-expressions.html
www.google.com.tw/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDEQFjAA&url=http%3A%2F%2Fspace.uwants.com%2Fhtml%2F31%2F2470831-395547.html&ei=SbUdUoKtEsXDkgX_tYCABA&usg=AFQjCNEbcCzD_IrIXgBKaeKpYCfpHjsSHg
http://zh.wikipedia.org/wiki/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F
http://tigermax.dyndns.org/bbs/forum.php?mod=viewthread&tid=6251




Publish time 2013-10-24 23:12:40

Other application of the ultraedit perl replace A on B:
1. Get the specific source  from some homepage

http://blessing.bdmv.info/tutorial/ultraedit_perl_01.png

http://blessing.bdmv.info/tutorial/ultraedit_perl_02.png
2.
fill the pattern.*href="(.*mkv\|)([^\|]*)\|([^\|]*)\|.*and replace with\1\2|\3|then, you can get the pure ed2k links


http://blessing.bdmv.info/tutorial/ultraedit_perl_03.png

Publish time 2013-10-26 00:52:39

Another application:D
Baidu cloud (百度雲) download by SMG

First, you need to install BaiduPanDownloadHelper.
Then you can view the links source like above example's step.

http://blessing.bdmv.info/tutorial/ultraedit_perl_04.png

Final that you also deal with the source by ultraedit to get pure donwnload links.
1.regular express engine set to UltraEdit and replace amp; on none(Null)
2.regular express engine set to UltraEdit, then replace <a class= on ^p<a class=
3.regular express engine set to Perl
pattern.*href="([^\"]*)\".*[^>]*>(.*mkv).*replace with\1|\2
http://blessing.bdmv.info/tutorial/ultraedit_perl_05.png

Then, you can get the download link, and you can copy these links into SMG to download files

http://blessing.bdmv.info/tutorial/ultraedit_perl_06.png
Pages: [1]
View full version: [2013.08.29]Using Regular Express to Get the Value from Win8.1(WHCK) System IQ Test