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

Recording popularity by day, week.. all time?
Hey everyone, I'm creating a site designed around users uploading music. How can I implement a syste

Tree Menu
Hi guys,

Can anyone help me making a tree navigation system? I have a site where I'm allowin

PHP Search Issue
Hi, I am using the following code to search and return flights from a database. The user searches by

User registration and login
I don't know whether this is the correct forum, if not i apologise but am pretty desperate at the mo

mysql UPDATE request not working and driving me crazy!!!
Hi,

I have been stuck on this for ages.

Quite simply I am trying to update my database

User feedback after MySQL query has been executed
Hi all, I've just registered on PHPFreaks because I've got a question that I simply can't work out b

Problem with Sending Mail by PHP
hello all,
I m new to php, can u plz provide me the code to send mail by php having CAPTC

Simple image grab script.
I was wondering if it was possible and if anyone knew how to make a simple php script that looks at

Blocking video streaming
Hello everyone,

I post a message here because i didn't find any solution yet.
I just finis

Help with email validation please...
Hi,
Please could you help.
I have a register.php login page where users register, the detail

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