extract ids without spaces