954,496 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

removing double quotes using strpbrk()

Hi Guys,

I'm trying to remove all the special characters within a file using the code below but I need to remove also the doble quotes " but what should I use to enclose the characters. I've been looking but can't find. Thanks.

while (sep != 0)
{
sep = strpbrk(line, "\<=->/'");
if (sep != 0)
*sep = ' ';
}

hariza
Light Poster
38 posts since Sep 2006
Reputation Points: 31
Solved Threads: 0
 

use the escape sequence character. and to get the '\' you need two of them

sep = strpbrk(line, "\\<=->/'\"");
Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

hi There,

I tried but I'm getting:
unknown escape sequence '\<'

hariza
Light Poster
38 posts since Sep 2006
Reputation Points: 31
Solved Threads: 0
 

yes, I knew that would happen. Please look at my post very carefully because I showed you the correction -- two '\' characters.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

Thanks you are a legend it works now. thanks.

hariza
Light Poster
38 posts since Sep 2006
Reputation Points: 31
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You