commit e50d533d598dbe284e225e2ee52ed5f76a6e6f6a
Author: Randy Palamar
AuthorDate: Sun Jan 7 11:02:17 2024 -0700
Commit: Roberto E. Vargas Caballero
CommitDate: Tue Jan 16 09:11:40 2024 +0100
expr: treat expressions as strs until evaluation
Comparison operations (>, <, =,
commit 270ca025ce236885e3177cd7acfd2cfbdf6e36a5
Author: Randy Palamar
AuthorDate: Sun Jan 7 11:02:18 2024 -0700
Commit: Roberto E. Vargas Caballero
CommitDate: Tue Jan 16 09:11:46 2024 +0100
expr: don't evaluate matched substr as a number
POSIX specifies that if the pattern
Hi
On Sun, Jan 07, 2024 at 11:02:17AM -0700, Randy Palamar wrote:
> Comparison operations (>, <, =, etc.) and matching operations must
> operate originally provided string not one that has gone back and
> forth through string formatting. This caused operations such as
> the following to give
Hi,
On Sun, Jan 07, 2024 at 11:02:18AM -0700, Randy Palamar wrote:
> POSIX specifies that if the pattern contains a subexpression then
> the first matched subexpression should be returned if it exists.
>
> This fixes things like the following:
>
> ./expr 3 : '\(.*\)'
> Before: 3
> After: