MACROMEDIA COLDFUSION 5-CFML Reference - page 587
Alphabetical List of ColdFusion Functions
569
The number of elements in the pos and len arrays is always one
if you do not use parentheses in the regular expression.
The value of st.pos[1] is:
The value of st.len[1] is:
Substring is [#Mid(testString,st.pos[1],st.len[1])#]
However, if you use parentheses in the regular expression,
the first element contains the position and length of the first
instance of the whole expression. The position and length of the
first instance of each parenthesized subexpression within is
included in additional array elements.
For example:
<CFSET st1 = REFind("([[:alpha:]])[
]+(\1)",testString,1,"TRUE")>
The number of elements in each array is
First whole expression match; position is
length is #st1.len[1]#; whole expression match is
[#Mid(testString,st1.pos[1],st1.len[1])#]
Subsequent elements of the arrays provide the position and
length of the first instance of each parenthesized subexpression
therein.
Substring is [#Mid(testString,st1.pos[i],st1.len[i])#]
cfoutput>