phpSensei Posted July 5, 2009 Share Posted July 5, 2009 Hello, wow its been a looooooooooong time since I've been here. Back in the day i use to help out all the noobs lol, but now its time to be helped. Simple and stupid question Lets say I have a random sentence everytime a refresh a page, but every sentence will have the word "apple" in there... ALSO the words apple are in [ b ] bbcodes on purpose. I like eating [b]apples[b] all day long. Because [b]apples[/b] are good. now i want to know how to delete everything outside the [ b ] [ /b ] tags... I DONT WANT TO USE EXPLODE! I want to specifically delete everything but preserve any word within the bold tags. Link to comment https://forums.phpfreaks.com/topic/164818-how-to-take-a-word-from-a-string/ Share on other sites More sharing options...
trq Posted July 5, 2009 Share Posted July 5, 2009 You'll want to ask your question in the regex board. Link to comment https://forums.phpfreaks.com/topic/164818-how-to-take-a-word-from-a-string/#findComment-869100 Share on other sites More sharing options...
phpSensei Posted July 5, 2009 Author Share Posted July 5, 2009 You'll want to ask your question in the regex board. Im so stupid, i forgot about the 4th parameter of the preg_match... little rusty. thanks tho. I wont forget to put it there next time; Link to comment https://forums.phpfreaks.com/topic/164818-how-to-take-a-word-from-a-string/#findComment-869105 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.