Bryan,

Take a look at this as an example. Its rough and ready but works in all your
test cases....

<cfset teststring = '[EMAIL PROTECTED],<[EMAIL PROTECTED]>,DisplayName
<[EMAIL PROTECTED]>,"DisplayName" <[EMAIL PROTECTED]>,[EMAIL PROTECTED] (DisplayName)'>

<cfset startpos = 1>
<cfset foundall = false>
<cfloop condition="foundall IS false">
<cfset st1 =
ReFindNoCase("([^\x01-\x20\;\""\,])[EMAIL PROTECTED];\""\,]*(\.[a-zA-Z]{2,
})*", teststring, startpos, True)>
<cfif st1.pos[1] GT 0>
  <cfoutput>#st1.pos[1]#; length is #st1.len[1]#
#ReplaceList(Mid(testString,st1.pos[1],st1.len[1]), "<,>",
"")#</cfoutput><br>
  <cfflush>
  <cfset startpos = st1.pos[1] + st1.len[1]>
  <cfif startpos GT len(teststring)>
   <cfset foundall = true>   
  </cfif>
<cfelse>
  <cfset foundall = true>
</cfif>
</cfloop>

Paul
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to