NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Check with REGEX, value from MessageBox

Hii,
I want to check the validity of the data entered in a Messagebox with Regex ??

 

Best

Akshay

0 Kudos
Message 1 of 5
(982 Views)

Hi Akshay,

 

if you are generally asking about how to use regular expressions in TestStand:

As far is I know, TestStand still does not support regex directly.

However you can use the Windows Regex Library for that by calling it in a .Net Action Step like this:

kghzvi_0-1657281711358.png

 

As for accessing the text entered by the user into the Message Popup, you can access it via Step.Result.Response.

 

Stefan

 

0 Kudos
Message 2 of 5
(969 Views)

Akshay/Stefan,

TestStand does support regular expressions directly in TestStand. It can be done in the following ways:

 

  • Use 'MatchPattern', 'FindPattern' and 'SearchPatternAndReplace' in TestStand expression.
  • Use 'Regular Expression - Case Sensitive' or 'Regular Expression - Ignore Case' in String Value Test.

 

-Shashidhar

0 Kudos
Message 3 of 5
(943 Views)

Hello Shashidhar,

 

from what I read here:

https://forums.ni.com/t5/NI-TestStand-Idea-Exchange/Add-Regular-Expression-comparison-type-to-String...

these functions are "recent" additions in TestStand 2020.

 

Thanks for the update.

Stefan

0 Kudos
Message 4 of 5
(935 Views)

Thanks guys,
I used a .Net Call and made Regex Test from it.

0 Kudos
Message 5 of 5
(925 Views)