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.
Did you know?Explore Trending and Topic pages for more stories like this.

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

Retrieving Data from Two Different Databases
Hello All,

Ran into another problem and would appreciate some help! I have two datab

Sending UDP Raw socket
I truly need help on this. I am trying to write a test program that simulate a network environment

simplexml and xpath - Need some help
Hello,

I am trying to parse an xml which comes back from Amazon and I am trying to know how m

switch not getting value
what am i doing wrong?
i want to populate the country list according to the category
i want to

send message to the java application
Oracle 10g with Windows platform.

I have a java application that periodically pings the d

What's wrong with my code
sobbing for many days, still don't know why please Help. Why my page isn't posted correctly. In a

help with variable
I've got a problem, i want to echo some images depending on the $id, however for me to get that id i

Post, not working, please help
The error is:
Method Not Allowed
The requested method POST is not allowed for the URL /student

Email logic not working
I would like to send an email using the php email() function then if it does execute i.e sends i wou

php multiple action on submit
I have a form which says:

<form enctype='multipart/form-data' method='post' action='pr

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