tracker issue : CF-4126707

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

refind() doesn't return all matches

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 03/09/2016

Components: Language

Versions: 2016

Failure Type: Unspecified

Found In Build/Fixed In Build: Alpha_v12 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Win All

Vote Count: 0

See attached file for unit tests. The ones in particular to look at are the ones in which there are multiple matches to be returned, and the regex pattern has subexpressions. CF does not return the subexpressions. 

Very cut down example:

[code]
haystack = "We will try to find all the four letter words in this sentence.";
pattern = "\b((\w{2})(\w{2}))\b";
results = haystack.reFind(pattern, 1, true, "ALL");
writeOutput(serializeJson(results));
[code]

This returns:

[code]
[{
	"LEN": [4, 4, 2, 2],
	"POS": [4, 4, 4, 6],
	"MATCH": "will"
},{
	"LEN": [4, 4, 2, 2],
	"POS": [16, 16, 16, 18],
	"MATCH": "find"
},{
	"LEN": [4, 4, 2, 2],
	"POS": [29, 29, 29, 31],
	"MATCH": "four"
},{
	"LEN": [4, 4, 2, 2],
	"POS": [50, 50, 50, 52],
	"MATCH": "this"
}]
[/code]

It *should* return:

[code]
[{
	"LEN": [4, 4, 2, 2],
	"POS": [4, 4, 4, 6],
	"MATCH": ["will", "will", "wi", "ll"]
},{
	"LEN": [4, 4, 2, 2],
	"POS": [16, 16, 16, 18],
	"MATCH": ["find", "find", "fi", "nd"]
},{
	"LEN": [4, 4, 2, 2],
	"POS": [29, 29, 29, 31],
	"MATCH": ["four", "four", "fo", "ur"]
},{
	"LEN": [4, 4, 2, 2],
	"POS": [50, 50, 50, 52],
	"MATCH": ["this", "this", "th", "is"]
}]
[/code]

The match key should have a substring for each pos/len pair.

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

Watson Bug ID:	4126707

External Customer Info:
External Company: Straker Interactive
External Customer Name: Adam Cameron
External Customer Email: CAMERON.ADAM@GMAIL.COM
External Test Config:  


Bug File Paths:
\\sjshare.corp.adobe.com\Prereleasebugfiles\ColdFusion\12.0\Alpha_v12\4021668\3321666_reFind.cfc

Attachments:

Comments:

Adding BUG AUDIT TRAIL ********action: updated fieldName: Closed By newValue: suchsing oldValue: Blank oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-11-18 13:14:08.0 action: updated fieldName: Owner newValue: Blank oldValue: suchsing oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-11-18 13:14:08.0 action: updated fieldName: Status newValue: Fixed oldValue: ToTest oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-11-18 13:14:08.0 action: updated fieldName: State newValue: Closed oldValue: Open oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-11-18 13:14:08.0 action: updated fieldName: Reason newValue: Blank oldValue: Fixed oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-11-18 13:14:08.0 action: updated fieldName: Date Closed newValue: 2015-11-18 05:14:08.0 oldValue: Blank oprid: suchsing recordName: RQ_DEFECT timpestamp: 2015-11-18 13:14:08.0 action: updated fieldName: Date Fixed newValue: 2015-11-02 12:16:27.0 oldValue: Blank oprid: mchandna recordName: RQ_DEFECT timpestamp: 2015-11-02 20:16:28.0 action: updated fieldName: Fixed By newValue: mchandna oldValue: Blank oprid: mchandna recordName: RQ_DEFECT timpestamp: 2015-11-02 20:16:28.0 action: updated fieldName: Owner newValue: suchsing oldValue: mchandna oprid: mchandna recordName: RQ_DEFECT timpestamp: 2015-11-02 20:16:28.0 action: updated fieldName: Status newValue: ToTest oldValue: ToFix oprid: mchandna recordName: RQ_DEFECT timpestamp: 2015-11-02 20:16:28.0 action: updated fieldName: Reason newValue: Fixed oldValue: Blank oprid: mchandna recordName: RQ_DEFECT timpestamp: 2015-11-02 20:16:28.0 action: updated fieldName: Changelist newValue: 296247 oldValue: Blank oprid: mchandna recordName: RQ_DEFECT timpestamp: 2015-11-02 20:16:28.0 action: updated fieldName: QE Assigned newValue: suchsing oldValue: poojain oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2015-10-28 03:48:18.0 action: updated fieldName: Dev Assigned newValue: mchandna oldValue: awdhesh oprid: rukumar recordName: RQ_DEFECT timpestamp: 2015-10-07 07:30:01.0 action: updated fieldName: Fix By Product Milestone newValue: Beta oldValue: Alpha oprid: rukumar recordName: RQ_DEFECT timpestamp: 2015-10-07 07:30:01.0 action: updated fieldName: Fix By Milestone newValue: Beta oldValue: Alpha oprid: rukumar recordName: RQ_DEFECT timpestamp: 2015-10-07 07:30:01.0 action: updated fieldName: Owner newValue: mchandna oldValue: awdhesh oprid: rukumar recordName: RQ_DEFECT timpestamp: 2015-10-07 07:30:01.0 action: updated fieldName: Fix By Milestone newValue: Alpha oldValue: Beta oprid: awdhesh recordName: RQ_DEFECT timpestamp: 2015-08-18 11:24:48.0 action: updated fieldName: Fix By Product Milestone newValue: Alpha oldValue: Beta oprid: awdhesh recordName: RQ_DEFECT timpestamp: 2015-08-18 11:24:48.0 action: updated fieldName: Fix By Milestone newValue: Beta oldValue: Blank oprid: poojain recordName: RQ_DEFECT timpestamp: 2015-07-21 02:46:19.0 action: updated fieldName: Owner newValue: awdhesh oldValue: poojain oprid: poojain recordName: RQ_DEFECT timpestamp: 2015-07-21 02:46:19.0 action: updated fieldName: Reason newValue: Blank oldValue: Blank oprid: poojain recordName: RQ_DEFECT timpestamp: 2015-07-21 02:46:19.0 action: updated fieldName: Fix By Product Milestone newValue: Beta oldValue: Blank oprid: poojain recordName: RQ_DEFECT timpestamp: 2015-07-21 02:46:19.0 action: updated fieldName: Priority newValue: 2 oldValue: 0 oprid: poojain recordName: RQ_DEFECT timpestamp: 2015-07-21 02:46:19.0 action: updated fieldName: Status newValue: ToFix oldValue: Unverified oprid: poojain recordName: RQ_DEFECT timpestamp: 2015-07-21 02:46:19.0 action: updated fieldName: Owner newValue: poojain oldValue: inoel oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2015-07-20 03:58:16.0 action: updated fieldName: QE Assigned newValue: poojain oldValue: inoel oprid: vmannebo recordName: RQ_DEFECT timpestamp: 2015-07-20 03:58:16.0
Comment by CFwatson U.
3447 | March 09, 2016 04:43:26 AM GMT
Added By:vmannebo Note Added: Test note Date Added :2015-07-17 09:56:55.0 Added By: PreRelease User User Name:Adam Cameron Note Added: Entered Bug. Date Added :2015-07-16 07:55:16.0
Comment by CFwatson U.
3448 | March 09, 2016 04:43:27 AM GMT