Update: comments pointed out that such edits are against the code of conduct, even if not automated. I leave this post just as personal hint on queries and regexp's.
It happens there's a lot of OSM tags "ele"=" m" that can't be processed by useful queries like find volcanoes between 1000 and 2500 meters high
How I remove unit of measure:
- download faulty data with this generic overpass-turbo query
from export menu, "download/copy as raw OSM data"
load resulting .osm file in Notepad++ (or whatever regexp editor)
find&replace (CTRL+h) twice with the following fields:
find: k="ele" v="(\d+(.\d+)) m" will find for example "450.5 m"
replace: k="ele" v="$1" will replace "450.5"
find: k="ele" v="(\d+) m" will find for example "450 m"
replace: k="ele" v="$1" will replace "450"
load in JOSM modified .osm file
select all (CTRL+a) and add a fake tag (ie: pippo=pluto) to every node and remove it (just a shortcut to add "modify" tag to elements, otherwise you won't be able to upload anything
Remember to add proper changeset comment.