RE: How can I check this string a different way?
Will said that it would be OL1, OL2, in which case your example wouldn never eval to true. Will, something like this should work: cfset isOLCourse = REFindNoCase(OL[0-9]+,ListLast(getsection.section, -)) That looks for the letters OL followed by at least one number. -Original Message- From: Jim McAtee [mailto:[EMAIL PROTECTED] Sent: Saturday, April 28, 2007 4:24 PM To: CF-Talk Subject: Re: How can I check this string a different way? - Original Message - From: Will Tomlinson [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Saturday, April 28, 2007 2:54 PM Subject: How can I check this string a different way? I need a better way to evaluate a string here. Maybe a regex I guess? I have a hyphen-delimited list. The last item in the list needs to be flagged if it contains OL1, OL2, etc. Just if it contains the OL at all, I need to flag it as an online course. Here's what I'm using now, what's a better way to handle it? cfif ListLast(getSection.section, -) CONTAINS OL cfset isOLCourse = true /cfif cfset isOLCourse = Left(ListLast(getSection.section, -), 2) is OL ~| ColdFusion MX7 by AdobeĀ® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276545 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: How can I check this string a different way?
Am I missing something here? Isn't the Left 2 of OL1 or OL2 'OL'? Will said that it would be OL1, OL2, in which case your example wouldn never eval to true. Will, something like this should work: cfset isOLCourse = REFindNoCase(OL[0-9]+,ListLast(getsection.section, -)) That looks for the letters OL followed by at least one number. cfset isOLCourse = Left(ListLast(getSection.section, -), 2) is OL ~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276577 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
How can I check this string a different way?
I need a better way to evaluate a string here. Maybe a regex I guess? I have a hyphen-delimited list. The last item in the list needs to be flagged if it contains OL1, OL2, etc. Just if it contains the OL at all, I need to flag it as an online course. Here's what I'm using now, what's a better way to handle it? cfif ListLast(getSection.section, -) CONTAINS OL cfset isOLCourse = true /cfif Thanks, Will ~| ColdFusion MX7 by AdobeĀ® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276493 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: How can I check this string a different way?
- Original Message - From: Will Tomlinson [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Saturday, April 28, 2007 2:54 PM Subject: How can I check this string a different way? I need a better way to evaluate a string here. Maybe a regex I guess? I have a hyphen-delimited list. The last item in the list needs to be flagged if it contains OL1, OL2, etc. Just if it contains the OL at all, I need to flag it as an online course. Here's what I'm using now, what's a better way to handle it? cfif ListLast(getSection.section, -) CONTAINS OL cfset isOLCourse = true /cfif cfset isOLCourse = Left(ListLast(getSection.section, -), 2) is OL ~| Create Web Applications With ColdFusion MX7 Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276494 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4