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

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

include
Hi I have this way of licensing my PHP application, and I want to know if you guys can answer some q

PHP arrays into arrays need help
Hello
I am trying to highlight the days on my calendar based on the dates that i have in my datab

login from external site
Hi my new experience begins, Now what i am trying to do is i make three pages, login.php logout.php

Problem with shopcart code
Hello, I am having a bit of trouble being able to add a product to my shopcart. My mysql database i

How could I do this?
Ive got a simple lottery game, and am using an sql database to keep track of the numbers bought. But

Working with popups and such in a class
I've recently started building my applications completely enclosed in classes. I like the fact that

my sql select id and then update problem.
I need to select some auto incremented ids out of a database and then use those id in a where statem

split values
I have values that are returned to me in this format:

name=>test,age=>49

need help in creating captcha
hi i have a problem creating captcha system. i create some basic script for image displaying but it

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