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!! 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(). 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!!!! 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) 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 [ ]!!! Link to comment https://forums.phpfreaks.com/topic/93490-regular-expression-needed/#findComment-479074 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.