4GL - Reading a field value and formatting

Hi all,

I would like to read a value from a field (TEXT) and If the user entered a value different than only numbers the system will replace all non number characters to blank.

something like :    replaceAll('[^0-9]', '')

is it possible?

Thank you.