Search found 5 matches
- Mon Jul 03, 2006 5:46 pm
- Forum: PHP - Code
- Topic: Regex help removing multiple commas
- Replies: 14
- Views: 3286
- Mon Jul 03, 2006 12:32 pm
- Forum: PHP - Code
- Topic: Regex help removing multiple commas
- Replies: 14
- Views: 3286
- Mon Jul 03, 2006 12:20 pm
- Forum: PHP - Code
- Topic: Regex help removing multiple commas
- Replies: 14
- Views: 3286
Sorry to bug again but I just noticed something. It will only remove multiple commas if there also are ! . or ? in the text. If there are only commas then it doesn't remove the extra ones. If I try the same thing with just ! . or ? it will remove them as expected. It's certainly strange behavior. I'...
- Sun Jul 02, 2006 3:15 pm
- Forum: PHP - Code
- Topic: Regex help removing multiple commas
- Replies: 14
- Views: 3286
- Sun Jul 02, 2006 3:07 am
- Forum: PHP - Code
- Topic: Regex help removing multiple commas
- Replies: 14
- Views: 3286
Regex help removing multiple commas
On my forum I have the following few functions that will remove extra ! . or ? and replace them with only 1. $message_array[$x] = preg_replace("/([\!])+/", "\\1", $message_array[$x]); $message_array[$x] = preg_replace("/([\?])+/", "\\1", $message_array[$x]); $...