mdwerne 3 Posted June 2, 2011 Hello, How might I write this line without using all the OR's? Seems like there is a more compact way to do this with a loop, just not sure what it is. ElseIf StringInStr($Version, "v1.3.1_04") <> 0 Or StringInStr($Version, "v1.3.1_05") <> 0 Or StringInStr($Version, "v1.3.1_06") <> 0 Or StringInStr($Version, "v1.3.1_07") <> 0 Or StringInStr($Version, "v1.3.1_08") <> 0 Or StringInStr($Version, "v1.3.1_09") <> 0 Or StringInStr($Version, "v1.3.1_10") <> 0 Or StringInStr($Version, "v1.3.1_11") <> 0 Or StringInStr($Version, "v1.3.1_12") <> 0 Or StringInStr($Version, "v1.3.1_13") <> 0 Or StringInStr($Version, "v1.3.1_14") <> 0 Or StringInStr($Version, "v1.3.1_15") <> 0 Or StringInStr($Version, "v1.3.1_16") <> 0 Or StringInStr($Version, "v1.3.1_17") <> 0 Or StringInStr($Version, "v1.3.1_18") <> 0 Or StringInStr($Version, "v1.3.1_19") <> 0 Or StringInStr($Version, "v1.3.1_20") <> 0 Then Thanks, -Mike Share this post Link to post Share on other sites
MrMitchell 16 Posted June 2, 2011 (edited) Try a RegEx... If StringRegExp($Version, "v1\.3\.1_(0[4-9]|1[0-9]|20)") Then Just need to figure out the perfect regex if the above is unsatisfactory Edited June 2, 2011 by MrMitchell Share this post Link to post Share on other sites
mdwerne 3 Posted June 2, 2011 Try a RegEx... If StringRegExp($Version, "v1\.3\.1_(0[4-9]|1[0-9]|20)") Then Just need to figure out the perfect regex if the above is unsatisfactory Seems to work perfectly! Nothing unsatisfactory about it... Thank you, -Mike Share this post Link to post Share on other sites