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

Simple code help with redirects
I am trying to figure out a redirect script that detects if the browser is IE 7 and if it does, redi

Creating a function
Basically i wanna put all this code in a seperate file

Code: <?php

SOAP Issue
Hi,

I am facing some understanding problem with SOAP basic.kindly recommend some SOAP expert.

PHP Game
hy i was wondering what's the best method in order to make some automatic updates in a php game
<

Displaying image pathname instead of image
Hello

Im trying to upload and then display images from a mysql database - Its only basic and

How to know if online site made with PHP
Hello,
I see some sites that does not display extensions at all , for example:

www.site.co

Help adding strtolower( to my in_array
strtolower i need to add it to this to work, iuno how.

Code: $moderators = array('Admin', 'ba

Displaying pictures
i have worked my way through storing images in directory and storing the location in mySQL db.Now i

please help me in this update statment
hi every one

if I have table and this data in it

id name
10

default SAP userid
hi,, I just like to know if it is ok to use the default SAP user id (SAP*)?

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