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

Error: SQL Syntax; Line 1
Code:

<?php require "global_settings.php"; ?>
<title&g

Variables and Include
Code: [Select]<?php

$header = $_COOKIE['mss']['header'];
$body = $_COOKIE['mss']['b

Multiple arrays inside data
Hi,

Simple question. I have a column called "array" in my database, and inserted in

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

Help with ORDER BY
Hello. I would like to order by ascending States, then Cities, then Gyms in the following code, but

HTML Email rec'd as Source Code
The code does create and send the email successfully. However, the message shows as html code and n

Display thumbnails as square while retaining aspect ratio
I am trying to figure out a way to make an image display as a square, for example 80x80 pixels, when

image upload script not working with png
The basic process of this php code is to take the submitted file, convert it to a small JPG thumbnai

Can't get the unicode character
I'm trying to get some text from various parts of a file. I have converted the file to hex (bin2hex)

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