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

PHP Multiples of 2, Show posts...not working (wordpress)
I have been using this code to show div.example with 6 li columns inside it, each li is a post with

Cache PHP Objects/Classes?
Does anyone have ideas about caching PHP objects using something like: http://memcached.org/

A href problem under php
Hello...

I tried to explain the issue in an earlier post.. but was not clear enough....

Multiple upload and Resize
I would like some help on my script I have the for my index.php

////

<html&

keeps going back to index.html ???????
ok so i started making my site using mostly.html files now i have added a fair chunk of php. My inde

Get Total From While Loop
I'm trying to get the total for each product and add them for a Grand Total to list outside the loop

Mass activity scheduling
Hi experts,

Im facing some problems to deal with mass activity jobs.
When I run some

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

sapgui f4 help last search
I know this has to be simople. One user (maybe more) does not have the "last search saved" from the

FILTER_CALLBACK -- Files?
Hi All,

I'm using the php filter functions to validate my form data. For custom filters, I'm

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