ted_chou12 Posted April 9, 2007 Share Posted April 9, 2007 can you use simple preg replace to clear everything after the hex # character? so: The Fox Jumped over #the lazy dog becomes => The Fox Jumped over and so on. Thanks. Ted Link to comment https://forums.phpfreaks.com/topic/46285-solved-preg-replace-deleting-everything-after-the-character/ Share on other sites More sharing options...
MadTechie Posted April 9, 2007 Share Posted April 9, 2007 what about <?php $STR = "The Fox Jumped over #the lazy dog"; $FIND = "[#].*"; $FOUND = ereg_replace($FIND, "", $STR ); ?> i am not the best person to ask.. But i am getting a book on RegExp something to help me sleep Link to comment https://forums.phpfreaks.com/topic/46285-solved-preg-replace-deleting-everything-after-the-character/#findComment-225196 Share on other sites More sharing options...
ted_chou12 Posted April 9, 2007 Author Share Posted April 9, 2007 thanks, that worked perfectly... Link to comment https://forums.phpfreaks.com/topic/46285-solved-preg-replace-deleting-everything-after-the-character/#findComment-225298 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.