jagat21 Posted July 3, 2007 Share Posted July 3, 2007 Hi all, i have following strings : $subject = "LEAD IT-PROGRAMMER/ANLST-SFLD"; $subject = 'PROGRAMMER/ANLST-SFLD'; now i want to generate a regular expression which can match/fetch the "PROGRAMMER/ANLST" from any of the string. Pls help... Quote Link to comment Share on other sites More sharing options...
effigy Posted July 3, 2007 Share Posted July 3, 2007 Don't you want to see if the strings contain "PROGRAMMER/ANLST"? I don't see why you'd want to fetch a literal, because you know the end result. Quote Link to comment Share on other sites More sharing options...
Wildbug Posted July 3, 2007 Share Posted July 3, 2007 if (stripos($subject,'PROGRAMMER/ANLST')!==false) { // matched } else { // no match } 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.