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

Lining up columns nicely.
Hello everyone, I'm having problems with making columns line up properly. Here is my code:

php ajax - two drop down list with a submit button
i have created a form with 2 drop-down list and a submit button. I would like to know how to pass th

problem with query error
First Thanks to those who helped me on my previous posts, and the following code i'm using is not mi

Using unserialize()
Hi there.

I have some data in my database that is serialized.

e.g.

a:2:{i:0

Character increment
Hi,

I am facing a scenario like above,but in my case i want to show up like Col A,Col B etc..

Multithreading design
Hi

I have come up with a Singleton class that manages a pool of database connections. Basical

retrieving policy name inside the function called by this particular policy
Hi there,

I've playing around with dbms_rls package, trying to set up some security repo

PHP mail() with images
I'm trying to get images to send along with my HTML e-mail sent through PHP mail(). I only tried vie

'grab_files', multiple extension?
hey guys,

can anyone suggest a way to make to following line of code look for files with more

Show specific day of the week
I have been racking my brain trying to get this function to work properly and it is doing so for eve

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