Filtering for a phrase using pregmatch


Posted on 16th Feb 2014 07:03 pm by admin

Here is my code which looks for addresses which start with ' src=" '

Code: [Select]preg_match_all('#src="(http://[^"]+)#', $value, $matches)
I want to modify this so that it only returns matches which contain the phrase "pass". So src="http://www.example.com/blah/pass/edu" would be picked up.
Did you know?Explore Trending and Topic pages for more stories like this.

Can someone kindly tell me how to do this? Thank you so much
No comments posted yet

Your Answer:

Login to answer
118 Like 16 Dislike
Previous forums Next forums
Other forums

double and single quotes in text fields acting up... help please
Single quotes, when entered into a text field, create an sql error upon Submit. It seems to create t

storing video files into mysql in php
hi

i have my video files in my folder ,
i have to store the path of the videos into db an

. and .. appearing instead of pictures
First of all, thanks very much for providing this forum. It is very much appreciated!

My son

writing a screen scraper
Hello,

I'm writing a screen scraper application and want to be able to get absolute addresses

PHP Upload issue
Hi guys,

I have stumble across an interesting issue with my script and is doing my head in.

for some reason mysql query not working, not inserting, please check it out
This code is not inserting anything into my db, don't know why, the $_SESSION variable does contain

Upload, SSL and more php help
I recently just installed a ssl cert and do i use https for the whole site or just for the checkout.

"GROUP BY" in arrays
Well i'm looking to do something i usually could do easily using COUNT and GROUP BY if it was a sql

Small problem with image resize script
Hi!

I am a little bit new to php and I have an issue installing an image resize script I down

help countdown timers
hello every one,

I'd like to know how to insert many countdowns in the same page.
The dura

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash