DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

pattern in vbscript

Hi,

 

i am currently working in NI DIADEM to parse my test reports into Database. for that i have created my dataplugins using VBScript. Now i want to read the below line from my test report. 

 

3.5.8    ABCCompany Current              5.957 milliA  GT    0.025 LT       20   GO

 

i have created my RegEXP object and pattern as given below to read similar type of lines.

 

"((.{6})\s(.+)\{(.+)\}\s(.{11})(.{5}))"

 

Is anything wrong in my pattern? 

 

 

thanks,

Shruthi

0 Kudos
Message 1 of 4
(4,397 Views)

Without knowing what the pattern is supposed to do, it's hard to tell whether its OK or not. Could you please provide some more details like whether you are using it from within a DataPlugin, which part of the test report line you want to parse using the pattern, how much the report lines differ from each other..

 

0 Kudos
Message 2 of 4
(4,381 Views)

Hi kalpana,

 

Additionally, when you say "database", do you mean the NI DataFinder, or do you mean some external relational SQL data base?

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 3 of 4
(4,358 Views)

Hi kalpana1993, 

 

 

That line looks like a tab separated file. I tested your regular expression in a regex tester and it wasn't working correctly, at least on my end. 

 

I know you might be set in your mind to use regular expression for this case. But, perhaps you should consider spliting by space or tab ?

 

As far as I see the pattern of that line is traduced as:  Test Sequence, Test Name, Test Result, Units, Operator 1, Upper Limit, Operator 2, Lower Limit and Test Status (that is if they respect that pattern through out the test report, for example if they skip an operator you might have problems but you can still control that). With that knowledge  you can  create your own internal headers and parse the data creating the respective properties or so.

 

 

My 2 cents. Hope you find a solution.

 

0 Kudos
Message 4 of 4
(4,273 Views)