vidyashankara Posted May 16, 2006 Share Posted May 16, 2006 Lets say i have this line.EXPDTA NMR, 10 STRUCTURES is there a command to check if the string contains the word NMR or no? This is what i want. If the line has NMR in it, It should output "10 Structures" or the words follow NMR. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/9816-check-if-a-line-has-a-particular-word/ Share on other sites More sharing options...
.josh Posted May 16, 2006 Share Posted May 16, 2006 preg_match Quote Link to comment https://forums.phpfreaks.com/topic/9816-check-if-a-line-has-a-particular-word/#findComment-36405 Share on other sites More sharing options...
vidyashankara Posted May 16, 2006 Author Share Posted May 16, 2006 Thanks! That did the job :) Quote Link to comment https://forums.phpfreaks.com/topic/9816-check-if-a-line-has-a-particular-word/#findComment-36408 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.