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

ORA-00932: inconsistent datatypes: expected - got CLOB
SO : windows xp
database : XE

there is a table (transito) with two fields of clob

Question about GD library
I am trying to make an image that shows a random quote from my database.


However I want t

PHP - HTTP Digest Authentication - Understanding Code Help
Hi Everyone,

This is my first time on your website and please excuse if I am asking silly que

COOIS - Saving Object Overview WIP Status layouts
COOIS - Would like to be able to save the layout of an Object Overview - WIP Status report. There i

fopen() security
As i understood the usage of fopen() for it to function correctly the Dir you write to has to be rw

Auto install
Hi I have a directory lets say "apps" that I then have more folders ie "email",

can i optmize image to 50% quality before uploading 2 server
Hi there

i have jus written a php program to upload and display images but when i try to uplo

need good snippet manager
Hi. as i am coding and learning more, it is becoming difficult to manage code snippets. how you mana

get multiple rows
Hi I want to get multiple rows from a db

I am using this for the db query
Code: public

Needing Youtube thumb nail fix.
I have a script on a site that pulls in you-tube videos,
The problem is, that the thumb nails for

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