mdwerne Posted June 2, 2011 Share 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 Link to comment Share on other sites More sharing options...
MrMitchell Posted June 2, 2011 Share 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 Link to comment Share on other sites More sharing options...
mdwerne Posted June 2, 2011 Author Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now