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

add 20 000 to the rowcnt
Hi ...
I need to add 20 000 to the row count but just cant find a way to do this i am new to php

Bit manipulation program with binary operations
My homework is to create a program to scan in and add binary numbers and print them like so

Troubles with a spider class
I am building a spider that will crawl through random whitepages (eg. anywho.com, switchboard.com, w

script is pulling more then they have....
I have this script for my game where they can change there race. This will cost them 2,500 points. H

echo $rows help
Hi all,

Hopefully something simple that I don't know!

I have this:

Code: [Selec

try catch error
I have been trying try catch but, I can't get it to work. The code opens a non existing file called

Using CSS to format MySQL query
Hi,

If i want to have a news page on my site, which displays all records of a table in descen

Curl timeout breaks script
So im having difficulties with skipping timeout error in curl
my script calls different functions

mysqli_fetch_assoc returns multiple arrays, how to return a single array
Hello, I am using mysqli_fetch_assoc which is returning multiple rows, so it looks like:

Code

data type in column definition
Hi,
I create a table with column called "Direction of Travel code ".
The travel codes in t

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