On Mon, Feb 10, 2025 at 5:34 PM Zachary Santer <zsan...@gmail.com> wrote:
> > int_regex='([+-]?)0*([[:digit:]]+)' > if [[ ${var} =~ ${int_regex} ]]; then > var="${BASH_REMATCH[1]}${BASH_REMATCH[2]}" > else > printf '%s\n' "Argument '${var}' is not a valid integer" >&2 > fi > The error message should be 'not a valid signed decimal with leading zeros constant'