Completed

Verify/Compare a value with a regular expression match

I am trying to find a way with the available commands to verify a value falls within a range.

I have a value that is stored in a variable, say the value is '1210'.

It the value falls within the range of 1207 - 1254, 1256 -1272 then it PASSES otherwise it FAILS.

How can I accomplish this validation?

0
3 comments
Avatar
Rex Feizi

Hi. We are adding some logic operators pretty soon.

For now, you can use the 2 commands to achieve this: 

 

Compare X > 1207 

Compare X < 1254

If X=1210 then both compare commands will PASS. If X=12800, then it will PASS the first one but will FAIL the second. 

Please let me know if this helps. 

0
Comment actions Permalink
Avatar
Dominic Luminello

Hi Rex,

 

That kind of helps but there is also another range.  The value can fall within 1207-1254 OR 1256-1272 and be valid/pass.

So if the value is say 1260 how would the logic work then?

0
Comment actions Permalink
Avatar
Dominic Luminello

Actually after typing this I realized I could do the workaround this way for now.

Compare X>=1207

Compare X<=1272

Compare X != 1255

0
Comment actions Permalink

Please sign in to leave a comment.