replace string characters using an array

replace string characters using an array

Hi team,

How do I replace invalid characters from a number of strings using an array to store the invalid characters?

I know that I have to use the .each function for every string i have

eg.

$("h2#mytring").each function (){
      
      var thisString = $(this).text();      

....................

Now what????

}


Thanks in advance

Dimitris