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

Change log of Cost centre change in Plant maintenance order
Hi,
How to view Change log of Cost centre in Plant maintenance order. Not visible thru 'Docume

Appending GET data with form submition
Okay, what I'm trying to do is to use a form to append an already existing GET data string.

I

help countdown timers
hello every one,

I'd like to know how to insert many countdowns in the same page.
The dura

How can you detect variable string in a massive string?
Ok guys, i need some help with this one.

I am going to be getting a large string, like 10-20

Creating XML with php
I need to creat an XML with php and have successfully produced a valid output.
The problem I hav

Help please - How to validate from 2 possible answers
Hi

I hope somebody can help me with what will probably be really simple, I'm pulling my hair

script is pulling more then they have....
I have this script for my game where they can change there race. This will cost them 2,500 points. H

Shuffle Array
Hi,

I am writing a script for a game that needs players to randomly be assigned a target (ano

how to insert value
I am having file bookissueadd.php..... in which i am having tag

<td height="21&q

Gerenate tabel in Php
I whant to generate a tabel takeing data from database like this one so the results to be display on

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