kks_krishna Posted May 19, 2007 Share Posted May 19, 2007 HI, I want replace the given string. The following are my requirements: eg. input string is " Hibernate Interc$%eptors - An Introduction EJB 3.0" the output string should be " Hibernate-Interceptors-An-IntroductionEJB-3-0" special characters should be removed. please help me.dot shd be replaced with "-". Thanks, Krishna Quote Link to comment Share on other sites More sharing options...
neel_basu Posted May 19, 2007 Share Posted May 19, 2007 echo preg_replace('/([^\w])/', '', $str); Here $str is the Original String. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.