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

bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error

Mastering Regular Expressions, Third Edition, is available.
The Third Edition of Mastering Regular Expressions is available.

QuoteThis third edition is 5

PHP Include not working
The website is http://www.grlistingservices.com

The code block is as follows:

<

Create or replace package is ending ORA-21700
Database 9.2.0., patch 8 (9.2.0.8.0).
I trying run
create or replace package ....etc.

this code is not working????
it says this error.. Warning: Division by zero in ..

the variables are correct, so why is th

type check while uploading
Hi Everyone,

How can I check the exact type of a file while uploading on my site?

Here

List/Menu Box
On an edit page when you want something to select what a user has previously selected from the datab

Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba

Is there something wrong?
Hi all,

Just a quick question... can someone look at this code and see if something is wrong?

Get word number x from string?
How can I use a function to loop through a string, and "have a look at" every word in the

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