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

Character Set Setup
Whats the best character set to use if you want every character to work, and also how do you make yo

php and downloading
I want to use a php script to create two files. Then I want it to redirect (or whatever) to have tho

remove trailing slash from array
I have the following array which contains trailing slashes I need to remove. What is the best way to

Help on code output
My CODE:

Code: [Select] echo "<phone>".$line["phone"].&qu

Error when call dll from oracle
Hi all, please help me!

I have dll write C language, I want call it from oracle procedur

MSSQL/PHP
I am tryint to setup a webapplication developed in PHP, Apache2.0 and SQLServer2000 as backend which

dropdown menu
Hello everbody,

I am php newbie.
I need to develop a program that once click the drop do

Grouping and sorting results
Please help with this query.

I have 2 tables in a database, countires and cities. states look

What am I missing here? Help!
Hello all!. I can't seem to get this working right. Well - it renders right, but something is goin

RadioButtonList data selection
view plaincopy to clipboardprint?

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