- last login
- 2025-2-4
- online
- 1028 hour
- regtime
- 2011-11-28
- readperm
- 200
- credits
- 3959
- posts
- 501
|
People can get the log file or htm report from WHCK, like below example
Copy the Code
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=([x0-9]+).*(Lux=[0-9]+).*
pattern2:
.*Test=([^,]+),Result=([^,]+),METRIC=([^,]+),Value=([^,]+),Expected=([^,]+)[^<]+Resolution=([^,]+),(Lux=[^,<]+)<.*
pattern3:
.*Test=([^,]+),Result=([^,]+),METRIC=([^,]+),Value=([0-9\.]+),Expected=([-0-9\.]+),.*,Resolution=([x0-9]+),(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
|
|