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.
Did you know?Explore Trending and Topic pages for more stories like this.

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

Record count of entire database
Does anyone know if there is a way to obtain the number of records in each table of the database usi

need help in update query
i create a form for update. there are 8 columns in my mysql table. on my main page all the data is r

Calculating a rating by adding number of points and dividing by number of items
I have a site that users can post links to files to download. They can rate these files on a 1-5 sca

Mail functionality from localhost to server
Hi

I am facing problem of mail functionality.

When i tested mail functionality in my

Simultaneous select/update/insert
Hi

How would I need to go about when 2 users update a single row simultaneous? And how would

Replacing a string on click of a button
Hi! Is there a way to replace a string on a click of a text link?

This is what I've come up w

Track downloads' status
Hello,

I need to make somehow, some system, to track whether downloads are completed or faile

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

Inserting Data into a MS Access DB using PHP.
As part of my uni course I am doing a placement at a company whom want me to create a client zone fo

Validating time
Hi Guys

what do you think of the following approach to validate a 24hour time:

http://

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