On Thu, Nov 14, 2024 at 11:10:30AM +0000, Yao Zi wrote:
> As specified in POSIX standard[1], delimiters in bracket expression
> should not terminate the regex and always have their original meaning,
> hus 's/[\/]//' matches either '\' or '/' and 's/[[:alpha:]/]//' matches
> any alphabet or '/'. But with busybox sed,
> 
>       $ echo a | sed 's/[[:alpha:]/]/b/'
>       sed: bad option in substitution expression
>       $ echo '\/' | sed 's/[\/]//'
>       \
> 
> This commit implements a state machine to determine whether a character
> is in a bracket expression, in order to parse escape sequence and
> command delimiters correctly, following the specification and other
> implementation's behavior (GNU and NetBSD). Corresponding test is added
> as well.

Ping on this patch, thanks for your time and review :)

Best regards,
Yao Zi
_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox

Reply via email to