Community
Participate
Working Groups
Build ID: I20070621-1340 Steps To Reproduce: 1. Open the Open Resource dialog (or the Open Type dialog, which both use the FilteredItemsSelectionDialog as the base). 2. Type "*" in the pattern input box. It matches nothing. 3. Re-type a single "?" in the input box. It matches every resource items. 4. Type "**" in the input box will also match every items. Since "?" means any single character and "*" means any string, this matching behavior is very confusing. More information:
(In reply to comment #0) > Since "?" means any single character and "*" means any string, this matching > behavior is very confusing. I thought * means 0 or more of the preceding char ... what happens if you use ".*" (the regex for <any char><or or more times> PW
Yes, ".*" matches any string. I've thought about this before, but then thought that it should apply to "?" as well, i.e., "?" matches 0 or 1 times of the preceding regular expression block in the extended regular expression. It's not clear to me what level of the regular expression is interpreted by the SearchPattern. I tried to compare with the behavior of UNIX grep and egrep. grep matches nothing with "*" and matches "?" as a literal since "?" is not a metacharacter in the traditional regular expression; while egrep matches anystring with either "*" or "?". In any case, the prompt message above the input box in the Open Resource dialog says "(? = any character, * = any string)", which seems to be confusing if "*" actually does not match any string.
(In reply to comment #2) > In any case, the prompt message above the input box in the Open Resource dialog > says "(? = any character, * = any string)", which seems to be confusing if "*" > actually does not match any string. Ah, agreed. PW
Now it works in the old OpenType dialog manner. People very often use patterns with * at the beggining, so we decided to ignore a single * and it should be treated as a feature.
Reassigning to Susan.
as per 2009 triage guidelines
*** This bug has been marked as a duplicate of bug 259741 ***