cancel
Showing results for 
Search instead for 
Did you mean: 

Regular Expressions in the Checkpoint Properties

SOLVED
Frequent Contributor

Regular Expressions in the Checkpoint Properties

Hello ,

I'm trying to use RegEx in the checkpoint properties but I think I have syntax problems or my be not using it correctly.

Here is what I'm doing: 

aqObject.CheckProperty(Aliases.browser.page.panelApp.panel.tableCont, "contentText", cmpMatches, "A Quantity\n667\nB Quantity5656\nC Quantity\n65757")

Here's what I'm doing: 

aqObject.CheckProperty(Aliases.browser.page.panelApp.panel.tableCont, "contentText", cmpMatches, "A Quantity\n regexp:\d{3}\nB Quantity regexp:\d{4}\nC Quantity\n regexp:\d{5}")

Is there anything I should correct here. I'm not very sure. Any help would be appreciated!

 

Thank you

Al

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Regular Expressions in the Checkpoint Properties

Could you try:

aqObject.CheckProperty(...., cmpMatches, "A Quantity\\n\\d+\\nB Quantity\\d+\\nC Quantity\\n\\d+")

4 REPLIES 4
Community Hero

Re: Regular Expressions in the Checkpoint Properties

What happens when you try it?

Frequent Contributor

Re: Regular Expressions in the Checkpoint Properties

Error: 

Actual Value
A Quantity↴667↴B Quantity↴5656↴C Quantity↴65757

Expected Value
A Quantity↴regexp:d{3}↴B Quantity↴ regexp:d{4} ↴ C Quantity↴regexp:d{5}
Highlighted

Re: Regular Expressions in the Checkpoint Properties

Could you try:

aqObject.CheckProperty(...., cmpMatches, "A Quantity\\n\\d+\\nB Quantity\\d+\\nC Quantity\\n\\d+")

Frequent Contributor

Re: Regular Expressions in the Checkpoint Properties

Thank you @IStaroverov . Regexp was definitely the issue and the formatting as well.

appreciate your help!

 

Thank you

Al

New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors