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

Generate PDF
Hi guys,

I would like to know if there is a way to generate pdf when clicking on a link. In f

php slowing my site?
Hi all,

I think that one of the reasons that my site doesn't work fast is that the code is ve

why does my session end?
my connect.php starts the session just so you know
i can navigate arround my site fine except whe

in php, link returns to the line
When I add a link in a php page, the link word returns to the line (as a
would do)

Examp

Cannot Connect to Database
I am writing an application to do annual reviews. I cannot get my script to work. Whenever it runs I

Help? Need help on project with templates involving mysql and php.
I'm having a hard time explaining what I want but basically here is what I have in place:

-Da

ASP.NET 2.0 - Enter Key - Default Submit Button
Hi,One of the most annoying things in developing web pages is handling the "Enter key" for form subm

PHP url branch??
Functionally, using PHP, I'm doing a test of login input submitted by a user via an html form in a f

Upload simple problem
Really confused!! I run once and it worked, but when i tried today...it didn't work

Which par

problem getting my contact form working
Yeah I know this is a pretty basic problem, but it's been a while since I've worked with PHP and I'm

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