Remove Special characters in objective c
<p>I want to remove the special characters from the file name. Please find the below code. I am have issue in removing the . from the file name, my code removes the .in the extension too.</p>

<pre><code>Ex filename = atf.bac.xlsx
Expected result: atfbac.xlsx
Current Behavior:atfbacxlsx


NSCharacterSet *doNotWant = [NSCharacterSet characterSetWithCharactersInString:@".#%;:?,/|\[]{}@$%^*"];
fileName = [[fileName componentsSeparatedByCharactersInSet: doNotWant] componentsJoinedByString: @""];
</code></pre>