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

grouping within a foreach?
hello all,

I currently have a list of products spit out from my db via a foreach loop. Right

how do i make new line after *
First check this page here. and you see my report. Im pulling form a mysql db. I want to beable to m

urldecode question
How would I format this line of code properly?

<?php echo urldecode($_GET['Title']); ?

How to change Time Zone
HI
I want to change the time zone of the server to another country.How can do that?

Thanks

pull content
I have an existing page, domain/adverts.php which has a good PR. I've just rebuilt my site and the n

My query is being run with no results.
I have this.

Code: function DropUser($duser_id, $user_email, $user_username) {

Optimize Code
Just started getting into the use of cookies. The following code will redirect users to a set URL s

Snapshot from video
anyone knw how to make a snapshot maker from avi n mkv format.
for example if i give a direct lin

Line break?
Hi, I'm new to the forum and new to php. I'm not sure if I'm using the correct terminology so here i

Simultaneous select/update/insert
Hi

How would I need to go about when 2 users update a single row simultaneous? And how would

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