View Issue Details

IDProjectCategoryView StatusLast Update
0003800unrealdocumentationpublic2009-01-24 10:51
Reporterjames2vegas Assigned Tosyzop  
Status resolvedResolutionfixed 
OSallOS Versionall 
Product Version3.2.8 
Fixed in Version3.2.8 
Summary0003800: incorrect description of wildcard matching
Descriptionaccording to doc/unreal32docs.html and wildcard '?' matches '... the expression, "a?c" matches an "a" followed by any character (or no character), followed by a "c."'. This is incorrect, glob(3), fnmatch(3), bourne derived shells, and the single unix specification @ agree that '?' matches a single character, not 0 or 1 characters. In terms of shell wildcards, what you are looking for is ?(?), a specific case of ?(pattern|...|pattern), but this is only available to the shell and not in glob.
Steps To Reproduce$ mkdir -p test/a{b,c,d,e,}f
$ ls test/
abf acf adf aef af
$ ls -d test/a?f
test/abf test/acf test/adf test/aef
$ ls -d test/a?(?)f
test/abf test/acf test/adf test/aef test/af
TagsNo tags attached.
3rd party modules



2009-01-19 09:31

administrator   ~0015692

That section is about regular expressions, not about glob-style matching.


2009-01-19 09:45

reporter   ~0015695

sure, but the referenced sentence is talking about wildcard '?', unless you're saying that regex '?' means any character or no character, when it means 0 or 1 of the previous character. the example is 'a?c' as a wildcard: 'matches an "a" followed by any character (or no character), followed by a "c."', which is not regex behaviour but an (incorrect) description of wildcard behaviour, which should be, 'matches an "a", followed by any single character, followed by a "c".'


2009-01-19 09:53

administrator   ~0015698

Sorry, now reading the exact part you meant, I can see what you mean. Wildcard ? is indeed not 0 or more but exactly 1 character.


2009-01-19 10:09

administrator   ~0015701

Fixed in .741:
- Updated regex documentation in unreal32docs, it had some incorrect
  statements regarding wildcards. Reported by james2vegas (0003800).

Issue History

Date Modified Username Field Change
2009-01-19 07:20 james2vegas New Issue
2009-01-19 09:31 syzop Note Added: 0015692
2009-01-19 09:45 james2vegas Note Added: 0015695
2009-01-19 09:53 syzop Note Added: 0015698
2009-01-19 10:09 syzop Note Added: 0015701
2009-01-24 10:51 syzop QA => Not touched yet by developer
2009-01-24 10:51 syzop U4: Need for upstream patch => No need for upstream InspIRCd patch
2009-01-24 10:51 syzop Status new => resolved
2009-01-24 10:51 syzop Fixed in Version => 3.2.8
2009-01-24 10:51 syzop Resolution open => fixed
2009-01-24 10:51 syzop Assigned To => syzop