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... Link to comment https://forums.phpfreaks.com/topic/58203-regular-exp-help-needed/ 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. Link to comment https://forums.phpfreaks.com/topic/58203-regular-exp-help-needed/#findComment-288736 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 } Link to comment https://forums.phpfreaks.com/topic/58203-regular-exp-help-needed/#findComment-288780 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.