chanchelkumar Posted February 28, 2008 Share Posted February 28, 2008 Hi all, I want a regular expression which check the variable contains ( , ),', Please help !!! Search alot in google... thanks in advance!! Quote Link to comment https://forums.phpfreaks.com/topic/93490-regular-expression-needed/ Share on other sites More sharing options...
trq Posted February 28, 2008 Share Posted February 28, 2008 To start with, if your looking for regex help, we have a specific board for it. Secondly, you dont need a regex for something so simple, take a look at strpos(). Quote Link to comment https://forums.phpfreaks.com/topic/93490-regular-expression-needed/#findComment-478957 Share on other sites More sharing options...
chanchelkumar Posted February 28, 2008 Author Share Posted February 28, 2008 (/['()]+/)) alert("Please remove Invalid characters from Companyname eg: ' ( )"); Solved!!!! Quote Link to comment https://forums.phpfreaks.com/topic/93490-regular-expression-needed/#findComment-478991 Share on other sites More sharing options...
tinker Posted February 28, 2008 Share Posted February 28, 2008 NB. Some companies do contain brackets (e.g. around the pty bit seems to be common, or for country or region) Quote Link to comment https://forums.phpfreaks.com/topic/93490-regular-expression-needed/#findComment-479052 Share on other sites More sharing options...
chanchelkumar Posted February 28, 2008 Author Share Posted February 28, 2008 replace with the characters inside [ ]!!! Quote Link to comment https://forums.phpfreaks.com/topic/93490-regular-expression-needed/#findComment-479074 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.