Created
July 7, 2025 20:59
-
-
Save trycf/4c183cd6a254abb438994963969c1eda 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
<cfset variables.calExp = '0/1 * 100'/> | |
<cfset dbz_patterns = ['/0','/ 0','/(0)','/ (0)'] /> | |
<cfloop array="#dbz_patterns#" item="dbz_pattern"> | |
<cfset variables.hasDivisionByZero = FindNoCase(dbz_pattern, variables.calExp) gt 0 /> | |
<cfif variables.hasDivisionByZero> | |
<cfbreak /> | |
</cfif> | |
</cfloop> | |
<cfoutput> | |
#variables.hasDivisionByZero# | |
</cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment