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

Snapshot from video
anyone knw how to make a snapshot maker from avi n mkv format.
for example if i give a direct lin

Keeping data in form
How can I keep whatever I write in the form?

DELETE FROM not working deletes wrong row
Hello

I have the following code which i found but it doesnt work properly.. it comes up with

Simple Question
I know this is a simple question, that if I knew what it was technically called i could probably loo

Retrieving Data from Two Different Databases
Hello All,

Ran into another problem and would appreciate some help! I have two datab

Merger of 6 sister companies under one flagship company after go live
Dear Experts,
I need one help regarding Merger of sister companies of same group. currently we

eregi to preg
Im converting my regex for php 5.3 and I am stuck on the following

Code: [Select]if((eregi(&q

simplexml and xpath - Need some help
Hello,

I am trying to parse an xml which comes back from Amazon and I am trying to know how m

Php mysql - select?
Hi i have this code:
Code: $iteminfo = mysql_query("SELECT desc FROM wc_items WHERE itemid =

Multi image upload
I have a gallery to build and want to build a dynamic upload form to allow for $var number of fields

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