Re: [PATCH] cmd: setexpr: fix no matching string in gsub return empty value

2024-02-05 Thread Lukas Funke
Hi Massimiliano, On 02.02.2024 15:36, Massimiliano Minella wrote: From: Massimiliano Minella In gsub, when the destination string is empty, the string 't' is provided and the regular expression doesn't match, then the final result is an empty string. Example: => echo ${foo} => setenv foo

[PATCH] cmd: setexpr: fix no matching string in gsub return empty value

2024-02-02 Thread Massimiliano Minella
From: Massimiliano Minella In gsub, when the destination string is empty, the string 't' is provided and the regular expression doesn't match, then the final result is an empty string. Example: => echo ${foo} => setenv foo => setexpr foo gsub e a bar => echo ${foo} => The variable ${foo}