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

Problem with array max size.
Hi to everyone,
I've got a homework about filling a bidimensional array un spiral shape, I alre

How to give the privillege for triggers?
Hi,

How to give the privillage for triggers to particular user?

Please let me

PHP Display Telephone Number On Referrer
I have used the php below to show a different telephone number in the header of the site depending u

Update Database
Hi All,


I have a problem with this:

Code: [Select]<?php
session_start();

CURL question
i am wondering if it's possible to use multi curl with login something like

login once to web

Data storage spaces in varchar2
Trying to understand what's happening.
I am selecting a value from a table that is defined as c

How to show a complete textarea ??
I enter Client Case Notes notes in a textarea field on a PHP form. The field is 5 rows deep and 70 c

UL and LI Add Form
The idea I want here is when the user click on a character name from the drop down select bar at the

Removing Title From database problem
Hi again ! i am having an issue with updating database. When i update any price of a title it remove

first few characters only
hi, does anyone know how to use PHP to take the first few words of a text and limit them? i have see

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