LeadCo
asked on
How do I parse to see if the word copay is in a variables content
I am doing a database query and pulling the variable "copay" whis is text that describes the benefits of the copay benefit for an insurance plan.
So copay may = "Not Covered" or "$35 copay after deductible" etc.
What i want to do is set a variable based on if the variable "copay" contains the word copay in it.
<cfif copay contains "copay" word> (I have no idea)
<cfset iscopay = 1> <cfelse>cfset iscopay = 0>
</cfif>
So copay may = "Not Covered" or "$35 copay after deductible" etc.
What i want to do is set a variable based on if the variable "copay" contains the word copay in it.
<cfif copay contains "copay" word> (I have no idea)
<cfset iscopay = 1> <cfelse>cfset iscopay = 0>
</cfif>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Guys wish I could all of you 500 points. They are all correct.
something like this:
<cfset iscopay = REFindNoCase(copay, "\Bcopay\B")>
copay will be 0 if not found or a number representing position of work 'copay' in the string if found
(\B is a regex word boundary)
Azadi