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

phpMailer will not connect using SMTP
I am trying to use phpMailer with smtp:

Code: [Select]$mailer = new PHPMailer();
$mailer-&

PHP and SMS
Hi all forum members. I am new here and am unsure what category shoild I post this in.
Moderator

eregi to preg
Im converting my regex for php 5.3 and I am stuck on the following

Code: [Select]if((eregi(&q

duplicate record notification
In my database, after insertion of records, I want to know if the record inserted is duplicate or no

Server side $_SESSION
how does one keep the session completely server side. no cookies to the browser at all. i need this

Php - mysql store data and use it later?
Hi, i' making a login page at the moment, however my username + password is stored many different pl

how do i make new line after *
First check this page here. and you see my report. Im pulling form a mysql db. I want to beable to m

displaying unknown amount of results
I am reading a directory and getting a list of folders in the directory, I want to display the folde

path to include folder
Hi everyone,

When I'm testing locally, I have to add the name of the site folder as part of t

php problem?
I don't think I'm stupid, but maybe I am.

I am working on a sit for a friend I am try to put

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