Once again left a dumb mistake in my bash snippet.

On Mon, Feb 10, 2025 at 11:34 AM Zachary Santer <zsan...@gmail.com> wrote:
>
> And then this isn't even half as good:
>
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

Reply via email to