>> I need to find all the attributes from the
>> string which does not have double codes
>> and replace the attribute with double codes.
>
> I assume you actually mean "double quotes".

Assuming ColdFusion MX or later 

<cfset myfind = '(<\w+(\s+\w+="[^"]*")*)(\s+\w+=)(\w+)'>
<cfloop condition="refind(myfind,html)">
        <cfset html = rereplace(html,myfind,'\1\3"\4"','ALL')>
</cfloop>

On ColdFusion 5 replace the first line with this: 
<cfset myfind =
'(<[[:alnum:]]+([[:space:]]+[[:alnum:]]+="[^"]*")*)([[:space:]]+[[:alnum:]]+=)([[:alnum:]]+)'>

hth

-- 
s. isaac dealey  

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1039
Subscription: http://www.houseoffusion.com/groups/RegEx/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21

Reply via email to