Q:

get only number in columns

I need get just numbers, ex: 1.5kg to => 1.5.  This is my query and data, but it doesn't quite work.  What should I change?
select 
    qt_produto as qt_product,
    regexp_replace(qt_produto, '[^0-9]', '') as new 
from fisc.controle_veiculo_fiscalizacao;

A:

Your query was close, it needs the 'g' flag and also needs to include any characters you want to keep, such as commas and periods.
Change your regexp_replace to this regexp_replace(qt_produto, '[^0-9.,]', '', 'g')

