QGIS – Use Field Calculator to Remove Symbols from Text

attribute-tablefield-calculatorqgisregular expression

I'm attempting to remove € symbols from values in the attributes of a geopackage. For example, I have a value 240 123€ that I want to turn into 240 123.

I'm using the field calculator to do this. So far here's what I have written down.
regexp_replace("myfield",'(^.*[0-9]+)','\\1')

This gives the same results as
regexp_replace("myfield",'([0-9]+)','\\1')

Both of these result in 240 123€.

Best Answer

Try this instead:

replace("field_name", '€', '')