They don't work in CFML, but they do just fine using the RegExp library in
JRE 1.4.
You can try them out using this CFC:
http://www.massimocorner.com/coldfusion/cfc/tmt_java_regexp.zip
Then run something likethis:
<cfset regExpObj=CreateObject("component","tmt_java_regexp")>
<cfdump var="#regExpObj.regExpMatches("(ab)+?", "abababababababab", 1)#"
label='regExpMatches("(ab)+?", "abababababababab", 1)'>
<cfdump var="#regExpObj.regExpMatches("(ab)++", "abababababababab", 1)#"
label='regExpMatches("(ab)++", "abababababababab", 1)'>
----------------------------
Massimo Foti
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com
----------------------------
> Just found out about possessive quantifiers from the O'Reilly Regular
Expression pocket reference. Something not mentioned in most places and
after some tests does not seem to be part of the CF RegEx ability. This
code:
> <cfset test=refindnocase('(ab)++', 'abababababababab',1,1)>
> <cfdump var="#test#">
>
> returns this error:
> Malformed regular expression "(ab)++".
> Reason: Nested repetitions *?+ in expression.
>
> Not really important, but interesting none the less.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Save $10 Download ZoneAlarm Security Suite
http://www.houseoffusion.com/banners/view.cfm?bannerid=66
Message: http://www.houseoffusion.com/lists.cfm/link=i:21:876
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/21
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:21
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54