smarty regex_replace no longer working in PHP8.030 (Smarty 3?)

in PDF manager I was using a regex_replace to remove the currency symbol (which varies) and check for non-zero shipping costs to print/not print some terms.

Fullscreen
1
{if $fields.annual_shipping_cost_c|regex_replace:"/^./":"" gt 0} print this {/if}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

After the upgrade to PHP 8.0.30 this no longer works and always returns true even when the value is $0.00 or empty.

What is the correct way to check for a non zero currency value in smarty?

All the suggestions I am finding online explicitly remove a "$" (or other individual currency symbol) but the currency can be one of four or five different ones and I would much rather have a cleaner solution that checking for each of the allowed currencies.

When tested

Fullscreen
1
{$fields.annual_shipping_cost_c|regex_replace:"/^./":""}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

or 

Fullscreen
1
{$fields.annual_shipping_cost_c|regex_replace:"/^[^\d]/":""}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Prints a 

Thanks,
Francesca