View Issue Details

IDProjectCategoryView StatusLast Update
0003800unrealdocumentationpublic2009-01-24 10:51
Reporterjames2vegasAssigned Tosyzop 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformOSallOS Versionall
Product Version3.2.8 
Target VersionFixed in Version3.2.8 
Summary0003800: incorrect description of wildcard matching
Descriptionaccording to doc/unreal32docs.html and http://www.unrealircd.com/files/docs/unreal32docs.html#regexrep 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 @ http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_13_01 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

Activities

syzop

2009-01-19 09:31

administrator   ~0015692

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

james2vegas

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".'

syzop

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.

syzop

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).

http://cvs.unrealircd.com/cgi/viewcvs.cgi/unreal/doc/Attic/unreal32docs.html.diff?r1=1.1.2.144.2.126&r2=1.1.2.144.2.127&search=None&hideattic=1&only_with_tag=unreal3_2_fixes

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