![]() |
Strip Everything except [IMG]url[/IMG] tag
Hi guys, I am hoping that you could help me. I have been googleing for over 2 hours and haven't found my solution.
I am creating a custom search which will enable me to search for all [ IMG]http://www.url.com[/IMG ]. But since I am pulling the information directly from vbulletin.post.pagetext, I am left with entire posts. Is there a PHP function to strip everything except the [ IMG]http://url.com[/IMG ] tags? Thanks in advanced, Sincerely, Jean |
Regular expressions will be your friend..
PHP Code:
|
Thanks for your help! But I am getting an error when using it,
Warning: preg_match() [function.preg-match]: Unknown modifier 'g' in /search_media.php on line 88 I tried looking at the preg_match manual but couldn't fix the problem, I will look at it again. |
Actually you should probably use "preg_match_all" because we are looking for multiples rather singular.
PHP Code:
|
I am still getting this error:
Warning: preg_match_all() [function.preg-match-all]: Unknown modifier 'g' in /search_media.php on line 92 I must be doing something wrong here... MMM, I'll try looking at the manual again. Thanks for your help. :) |
All times are GMT. The time now is 06:25 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|