Created
July 11, 2025 12:49
-
-
Save trycf/84602558e8670349d2a23a4425abfedb to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
pattern = ""; | |
tests = { | |
validLotNo1 = "1234567A", | |
validLotNo2 = "12345678", | |
validLotNo3 = "12A", | |
invalidLotNo1 = "", | |
invalidLotNo2 = "A", | |
invalidLotNo3 = "1234567^" | |
}; | |
for(var testName in tests) { | |
result = arrayLen(reMatchNoCase(pattern, tests[testName])) == 1 ? 'PASSED' : 'FAILED' | |
writeOutput("#testName#: #result#<br/>") | |
} | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment