tracker issue : CF-3401939

select a category, or use search below
(searches all categories and all time range)
Title:

[cfclient] refind - multiple line mode not supported from string in regular expressions in javascript like it is supported in java

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): / ext-user (Milan Chandna)

Created: 12/07/2012

Components: Mobile Support, Data Structure

Versions: 11.0

Failure Type: Incorrect w/Workaround

Found In Build/Fixed In Build: 283472 / CF11 Update5

Priority/Frequency: Minor / Very few users will encounter

Locale/System: ALL / Mac 10 All,Win XP All

Vote Count: 0

Listed in the version 11.0.05.293506 Issues Fixed doc
Problem:
In java regular expression you can enable multiple line mode from pattern string itself
If the pattern starts from (?m), then in java/coldfusion multiple line flag is enabled to search

refind uses regular expression and this flag in supported in coldfusion but it is not supported in ColdFusion

Snippet:
<cfoutput>#reFind("(?m)^two", "one#chr(10)#two#chr(10)#three/rfour")#</cfoutput>

expected output:
5
actual output:
giving error in regex

Method:

Result:

Expected:

Workaround:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3401939

External Customer Info:
External Company:  
External Customer Name:  
External Customer Email:

Attachments:

Comments:

The issue is fixed. Hence, closing this bug. (Comment added from ex-user id:prk)
Comment by Adobe D.
17002 | January 19, 2015 12:44:43 AM GMT
The fix for this bug is available in the pre-release build of ColdFusion 11 Update 5
Comment by CFwatson U.
17003 | February 20, 2015 09:27:27 AM GMT
Verified this is fixed in CF11 Update 5 (build 11,0,05,293506). The example in the description also returns 5 in CF11 Update 4 (build 11,0,04,293328). FYI, there is a doc bug on the regex syntax page: https://helpx.adobe.com/coldfusion/developing-applications/the-cfml-programming-language/using-regular-expressions-in-functions/regular-expression-syntax.html 1) Scroll down to (?m) section 2) See "This example returns 4 to indicate that it matched "two" after the chr(10) linefeed." should be "This example returns 5 to indicate that it matched "two" after the chr(10) linefeed." The 4 should be a 5. Thanks!, -Aaron
Comment by External U.
17004 | November 23, 2015 03:33:21 PM GMT