<cfset
<cfset values = ArrayNew(1) />
<cfset posStart = REFindNoCase("\{img([[:digit:]]+)\}", #Form.Text#, 0)
/>
<cfloop condition="#posStart# GTE 1">
<cfset posStop = REFindNoCase("\}", #Form.Text#, #posStart#) />
<cfset x = ArrayAppend(values, Mid(#Form.Text#,
#Evaluate(posStart+4)#, #evaluate(posStop-posStart-4)#)) />
<cfset posStart = REFindNoCase("\{img([[:digit:]]+)\}", #Form.Text#,
#posStop#) />
</cfloop>

Searches through #form.text# for occurrences of "{img([[:digit:]]+)\}",
i.e. {img123123}.  It then stores the list of img numbers in an array
called "values", e.g. {img123123} becomes 123123.  This array can then
be processed elsewhere.
--
Damien McKenna - Web Developer - [EMAIL PROTECTED]
The Limu Company - http://www.thelimucompany.com/ - 407-804-1014
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to