[hackers] [sbase] expr: treat expressions as strs until evaluation || Randy Palamar

2024-01-16 Thread git
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 (>, <, =,

[hackers] [sbase] expr: don't evaluate matched substr as a number || Randy Palamar

2024-01-16 Thread git
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

Re: [hackers] [sbase][PATCH 1/2] expr: treat expressions as strs until evaluation

2024-01-16 Thread Roberto E. Vargas Caballero
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

Re: [hackers] [sbase][PATCH 2/2] expr: don't evaluate matched substr as a number

2024-01-16 Thread Roberto E. Vargas Caballero
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: