This array formula (CTRL+SHIFT+ENTER) trim any non-alphanumeric characters:
{=TEXTJOIN("";1;MID(D2;ROW(INDIRECT("1:"&LEN(D2)))*IFERROR(SEARCH(MID(D2;ROW(INDIRECT("1:"&LEN(D2)));1);"-./ 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ")>0;LEN(D2)+1);1))}
But I want to substitute/replace this non-alphanumeric characters with simple space, only with regular or array formula. Its possible?