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.

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

cookie problem
I hv a website url
In this site main menu functionality based on cookie when user click on parti

Dynamic memory problem
Hey,

At the beginning of my code, I have this line:

Shape* gShape = 0;

Why use OOP?
Can someone explain to me why I should use OOP instead of procedure based code.

Im building a

this code is not working????
it says this error.. Warning: Division by zero in ..

the variables are correct, so why is th

get the country of visitor and display content based on that
Hello all,

I have seen that Google analytics can tell you where a visitor is coming from and

styling a RadioButtonList
HiI need to have a radio button and close to it, its lable, then a space then another set of those.

Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to

Help building / using array
First - this is a cross-posting, if this is wrong I apologise! What started out as a MySQL query que

TimeStamp Column Problem...
I'm mad at my self and thinking I'm a little retarded. It just be some one mistake I'm missing here.

Filename and Line Number Custom Error
I have a class, with a method that accepts 2 parameters. I would like to output error messages.

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