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: