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

Working with Dates, help.
Sooo to make a long story short, here's what im trying to accomplish.

I need to create a drop

DataTable Help Required
Hi all I am creating an app that utilises and MS Access back end and queries it quite a bit at vario

add to sql result
ok see rite now my sites hit counter is counted from the mysql visitor log i need to clear it aft

Feed Maker
Hi all.
First of all I must say I am not a php developer so I am afraid I don't know much about i

my sql select id and then update problem.
I need to select some auto incremented ids out of a database and then use those id in a where statem

Hyperlink in PHP to MySQL record
Hello,

I am having trouble as i am new to php. I have connected to the database and I have di

Restricted access to sub-folder in iis6 doesn't work?
Basically I'm trying to add restriction to sub-folder (which contains pdf) in web.config for iis6 as

Small problem with image resize script
Hi!

I am a little bit new to php and I have an issue installing an image resize script I down

How to restrict the display of report variants
Hello All,

I want t know how to restrict the display of report variants.
I mean, whe

some query on multilingual website
Hi all,

Which is the simplest and easiest method to make a website multilingual,
is it put

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