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

Else statement screws up all css
Does anyone know what goes wrong in the process with this php code?
This code seems to be causing

Wordpress IE issue
So I am trying to add the background shadow to my wordpress page. It works fine in Firefox but does

Find occurences of unicode characters in string
I need to prohibit filenames with everything but English characters and numbers but regexp and strin

Dealing with code in db query
I am dealing with C code and I need to make sure it is encoded some how to ensure its integrity and

foreach result into a single variable
Hi,

I have this code...

Code: [Select]foreach ($_POST['Interests'] as $interest =&

Program with calculate Meteorologic measurements
Hello I'm a beginner and I want to make a program with calculate Meteorologic measurements:
ba

Is there a way to override built in php functions without APD?
I am trying to use the
rename_function()
override_function()
options that are built into

check comment for html
hi, I just wanted to check if a comment a user posts contains HTML, and if it does, to not allow it

Read from a text file after a specific word
Hi all.

I have a text file that looks like the one below.
I know how to open the text fi

set xml path in flash when xml created in memorystream and webrequest
i am creating an xml file using memory stream and i want to load this xml file into the flash on cli

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