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

header redirect problems? please help
Ok i am making a site that generates youtube thumbnails and i am generating an image that displays 1

Help with echo()
I'm having some problems with this code:

Code: echo '
<A HREF="jav

help removing unwanted graphic
How do I remove the small elongated rectangular shape between the "Latest post" and "

need help about
i store the value of my select statement result to an array and stored it to a variable named $fname

php code to accept and delete incoming data
Using following HTML Code please show me how to write PHP code to accept and delete the incoming dat

Points for Wiki contribution
Hi everyone,

I want to know how long does it take for the moderator to award points for a

pointer 102 question
I read a book
1
2
3
4
5
6
7
8
9
10
11
12
int main() {

links using header()
Hi All

I'm not sure where to ask for help on this but I hope someone can offer some. I'm at

Login script (probably a simple error)
dbConfig.php
Code: <?
// Replace the variable values below
// with your specific dat

getting a website's source code as a variable? How?
Hey guys, is there any way for me to get the source code of a website as a variable for me to work w

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