-
Your Lord and Master, Foamy
In PHP what would the regular expression be to remove all punctuation from a string?
.,<>/?:;"'{[}]\|`~!@#$%^&*()-_=+
-
Perhaps it would be easier to just exclude everthing but letters, numbers?
ereg_replace( "[^A-Za-z0-9 ]", "", $something);
<edit>
You will probably want to keep spaces aswell 
</edit>
<Edited by PeterW on 12-28-2000 at 12:00 PM>
-
Your Lord and Master, Foamy
I will try that and no I don't want to keep spaces.
Spaces and some Punctuation are not allowed in IRC nicks.
-
Ahh.. I see.. a secret new project 
ereg_replace( "[^A-Za-z0-9]", "", $something); - for no spaces.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks