Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354506

Summary: matchesPattern and isLike fail for escaped wildcard pattern
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jeffdouglas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kathy Carroll CLA 2011-08-11 10:45:33 EDT
program matchDriver type BasicProgram {}
		
	function main()
		s1, pattern String;
		actual boolean;
		
		s1 = "ab*def";
		pattern = "ab\\*def";
		actual = s1.matchesPattern(pattern);
		dump(s1,pattern, actual);
				
		s1 = "ab%def";
		pattern = "ab\\%def";
		actual = s1.isLike(pattern);
		dump(s1,pattern, actual);
	end
	
	function dump(source string, pattern string, result boolean)
		if (result)
			syslib.writestdout("Found " + pattern + " in " + source);
		else
			syslib.writestdout("Not Found " + pattern + " in " + source);
		end
	end
	
end
Comment 1 Jeff Douglas CLA 2011-08-11 16:59:31 EDT
fixed
Comment 2 Kathy Carroll CLA 2011-08-12 07:28:47 EDT
Verified
Comment 3 Lisa Lasher CLA 2011-10-11 16:08:47 EDT
Closing this defect.