#5098 string match & glob: close-bracket in character set

obsolete: 8.5.12
open
5
2012-08-12
2012-08-11
No

As of now, it is not possible to include a close-bracket character in a bracketed set of allowed characters.
[scan]'s format uses bracketed sets of allowed characters, too, and it *does* allow a close-bracket as first char.

Having looked into the implementation of tcl's string-globbing, it seems that *before* entering that loop over the
bracketed characters, an initial check for ']' in the pattern and in the string to be matched would be a really simple
fix. Doing it that way, would even still allow a dash to be included verbatim, as well, by placing it right after the
close-bracket.

Discussion

  • Donal K. Fellows

    See also Bug 219233, for related issues.

     
  • Donal K. Fellows

    • milestone: --> obsolete: 8.5.12
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks