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

ob_ dynamic content
i was wondering about the potential to use ob to create a <div then remove it when the page

using a loop help
Hi guys , i need some help. I have this loop :
while ($row = mysql_fetch_assoc($Result)) { ?&

Data type mismatch
Hi,
I am migrating data from algol to c.I mapped real datatype in algol to double datatype in

Auto fill in input value based on User_ID
Hello,

I'm looking form some input on the following problem.

User loads page ->

check comment for html
hi, I just wanted to check if a comment a user posts contains HTML, and if it does, to not allow it

Target costs on Process orders not calculating
Hi All,

We have released standard costs for all the materials. We have also done Goods r

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

PHP5 - AJAX help
I've been following the tutorial on w2schools (http://www.w3schools.com/php/php_ajax_database.asp) a

Sending an SMS Message with ASP.NET
Often times it may be a requirement for your web application to send an SMS message. Such examples w

Motivational Posters
Hello,

I wonder how can i do them in php. Are there any sample codes that you can show me?

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