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

Last character removed
I have created a string from an array. I have inserted commas from my form values. I am trying to re

Accessing element of object array
Hello

My object looks like this:


Array ( [0] => User Object ( [id] =>

Call Screen statement Error
Dear Experts,

is there any setting that needs to be done before creating any dialog progr

JSON SORT WITH PHP
I have two products that I want to sort by say "Id:17, value: xxx" using php
The page w

insert quotes
Hi,

I have an output like this:
Code: john,18,Cancer
How can I change this to
Code:

PL/SQL: ORA-00947: not enough values error message
Hi all i am getting Error(25,63): PL/SQL: ORA-00947: not enough values error message when executing

order by date not ID number help php
I am trying to orginize the following code to order by date not id number.
any help would be grea

list files from folder, only one for each date
I have many files in a folder and wish to only list one of each date

these are the file names

php form help
Hey,

I use a control file to set my meta tags and titles

Here's an example
Code: &a

How do I create a 2D game "camera" to follow player?
In J2ME programming I'm targeting MIDP 2.0 devices.

I'm using gamecanvas and I was thinking t

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