1,105,271 Community Members

replace all but alphanumeric and some punctuation

Member Avatar
davedpss
Newbie Poster
7 posts since Sep 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I am trying to clean up some text that has some white space that I can't seem to get rid of. I have tried replacing \s, \t,\n, \r, \r\n etc. and that strips out most of the new lines but not all. When I look at in a text editor such as TextWrangler, I am seeing an upside down question mark where these spaces are. I thought instead of trying to match something and then deleting that I could try to delete everything but what matched. I don't know how to do this with regular expressions. If anybody had a pattern and a replacement that would work, I would appreciate it.

Thanks - Dave.

Member Avatar
diafol
Where are my eyes?
12,943 posts since Oct 2006
Reputation Points: 1,821 [?]
Q&As Helped to Solve: 1,845 [?]
Skill Endorsements: 92 [?]
Moderator
Featured
Sponsor
 
0
 

Anything to do with encoding?

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: