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

Google Wave
So... has anyone used it yet? Is it any good?

http://wave.google.com/help/wave/about.html#vid

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

PHP Cannot redeclare class
I have 6 files, and two of them do not seem to want to play well. I keep getting a "Cannot rede

Adding meta tags under Zend FW
Hello there, recently has come to my hands the FTP of a website which is running under Zend, I would

with clause
hi all, i have a big query that usually access the same table more than once. for example, i have s

Image loading
Hi Developers,

I'm trying to display an image from images/image.gif getting the url from mysq

Problem in OnClientClick and OnClick sync
Hi,Strange and irritating problem: I have below button declaration in markup of the aspx page:

unexpected T_STRING
error log "[Sat Jan 09 18:27:58 2010] [error] [client 127.0.0.1] PHP Parse error: syntax error

Confused with Loop
guys, i got confused with Looping...this is the case

I have 3 stocks, let say "Stock A&q

ereg_replace in Wordpress
Heya - so I'm working on this site: http://world-of-smiles.theportlandco.com/new-patients

The

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