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

Sendmail.php - heading error following check_input
Hi,

I would greatly appreciate some help? I am brand new to PHP and have been searching and e

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

Shuffle between users ??
I have multiple $users in table. I need to send them $message.

I need to send the next messag

Socket Server Response Headers
Earlier I had a post about my Socket Server, I wasn't able to get it to connect, now I can

I

Getting the full city list from maxminds geoip database
I am suprised I can't find any references to this.

I have maxminds geoip lite installed and i

Comparing two dates
Hi Guys
I have two dates I want to compare. Below is my current implementation. The problem with

extract a file from zip file
hi,
i know how to unzip a zip file in php, but is there a way to just extract a certain file only

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

Error when call dll from oracle
Hi all, please help me!

I have dll write C language, I want call it from oracle procedur

i have no idea why this isn't working
Code: <?php
session_start();
include("connect.php");

error_reporting(E

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