On 06/25/2012 10:46 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> On 26.06.2012 04:16, Robert Mabee wrote:
>> REG_NEWLINE causes incorrect results when a filename contains a newline,
>> both because a wild char won't match the newline, and because the generated
>> pattern anchors ^$ can match adjacent to the newline.
> Looks like you misinterpret the flags and it's actually reversed to what
> you say. Did you check that claimeed behaviour actuall occurs?
Yes, though with a different filename.
> REG_NEWLINE
> Match-any-character operators don't match a newline.
>
> A nonmatching list ([^...]) not containing a newline does
> not match a newline.
>
> Match-beginning-of-line operator (^) matches the empty
> string immediately after a newline, regardless of whether eflags, the
> execution flags of regexec(), con‐
> tains REG_NOTBOL.
Those are the undesirable (in my opinion) behaviors in this case, where
^ and $
are supplied automatically to make sure the user pattern matches the entire
filename, and everyone knows * matches all files, but newline in a filename
spoils both.
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu....https://lists.gnu.org/mailman/listinfo/grub-devel
opensubscriber is not affiliated with the authors of this message nor responsible for its content.