Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354506 - matchesPattern and isLike fail for escaped wildcard pattern
Summary: matchesPattern and isLike fail for escaped wildcard pattern
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-11 10:45 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:19 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.