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

UDP server recvfrom() always returns -1? :(
Hello all,
I am getting a very strange error in my code :( I am writing a server application in C

Move array index to end
Hey guys,
Quick question:

I have an array that looks like this:
Code: [Select]$var =

update 2 columns by doing inner 2-column query
Hi,
is something like this possible?

update contract_all set col1,col2 =
(

Weird MySQL error, why am I recieving this?
PHP Code:


<?php require "global_settings.php"; ?>
<titl

Hashing?
Hi, I was hoping to take a string value then convert it - consistently - across each of our pages in

Multipe Dynamic Controls & AutoPostback Issue
I currently have a need to create many dynamic controls (Example Textboxes) that need to do a PostBa

Need Reporting Advice
My SQL server doesn't support MS SQL reporting services that comes with SQL Enterprise or Express. T

Matchcode in ALV change header column
Hello everyone,

I am working in an SAP system that is currently in upgrade and conversion

How to clone an SAP ECC using bacup tape on z/os?
We want to clone our production to a different SID using backup tape.

Simple program to copy files between two computers over the web
I use logmein free and often need to move files between my two computers. Generally, I move the file

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