[EMAIL PROTECTED] wrote:
> I'm trying to extract the number 23 which follows the string Semester:
>
> Is this a job for regex?
Sure, this should do the trick:
<cfscript>
stMatch = REFind("Semester:\s*([1-9]+)", s, 1, true);
if(stMatch.pos[1] NEQ 0){
for(i = 2; i LTE ArrayLen(stMatch.pos); i = i + 1){
WriteOutput(i & ": " & Mid(s, stMatch.pos[i], stMatch.len[i]) &
"<br>");
}
}
</cfscript>
--
Lindsay Evans.
Developer,
Red Square Productions.
[p] 8596.4000
[f] 8596.4001
[w] www.redsquare.com.au
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004