Branch: Tag:


2016-05-13 12:44:53 by Per Hedbor <>

Extended glob pattern syntax:
o \ can now be used to quote special characters in the pattern
o [ can be used for ranges of characters ([bx] [a-c0-9] [^a] etc).

Also changed glob to return the matching glob instead of 1 when an
array is passed as the first (pattern) argument.

This can be used to remove some loops where you want to do different
things depending on which pattern matched.

Both these changes are incompatible.

113:      o Gz.crc32 now only returns positive results.    + o glob() has changed.    -  +  The main incompatibilities are that [ and \ are now special +  characters in the pattern, and if you check the return value against +  1 instead of checking if it's true, and use an array as the first +  argument you will have to change your code. +  +  This is in order to extend the glob function to cover what +  'standard' glob functions do: +  +  glob() now accepts quotes (\* to match a single *, as an example) +  and handles ranges ([abc] for a, b or c, [a-z0-9] for a single +  character between a and z or 0-9 +  +  You can also negate a range using ^ or ! ([^a-zA-Z] as an example). +  +  When the first argument (the pattern) to glob is an array, glob now +  returns which pattern in the array matched. +  +    Deprecated symbols and modules   ------------------------------