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

118 Like 16 Dislike
Previous php-forum Next php-forum
Other php-forum

Batch update record with Pagination
Hoping someone can help me with this issue I'm having, im trying to batch update records from a resu

Multiple while loops
I have several DB queries that I know should be returning results and aren't. I have a feeling it ha

Access website from only 1 computer...?
One of my customers wants his website to only be accessed by people in which they bought the website

PHP - MySQL Fail
My PHP code will only execute the first part of my code...

Code: <?php

sessio

Advice on how to delete a mysql row using my form
Hi,

I am very new to php and am struggling to work out how to delete a portfolio item (a row

Issues: PHP Forms -Clearing
I've tried looking online before actually asking for help, but I've been looking for about the past

multiple recipients + dbuser mail recall
Hello,

I am building a php login script.

When the user registers the script will send

gmdate() - want 1 hr before time
Hi,
I am using php gmdate().
Now I am entering all dates in my dbase using gmdate("Y-m-d

problem with GROUP BY and ORDER BY
i usually use this query to display the last 10 entries from a sql table:

Code: $query = &quo

help with variable
I've got a problem, i want to echo some images depending on the $id, however for me to get that id i

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