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

Paypal
Hi all,

I have an advanced basic knowledge of php

I want to try something new for a s

Default TimeZone
The server I'm working with is hosted in America so all times inserted into the database are coming

Displaying an image using echo command
I had done a query on my database, one of the fields being an image reference to a directory where a

Strange Oracle Query problem
Ok So I have this PHP class that talks to a Javascript class that basically creates a table of infor

value not going in data base
hello friends....
i am having a working javascript....when i am selecting any

have trouble in a if condition
The if below is working ok, it check when indexes, name, zipcode and state are empty.
Code: &

how to get values from $_Post with onchange="form.submit();"?
Hi, I have a form that submit to itself with a file upload field and two other hidden field values.<

Simple email form - Newbie
Hello all,

First time poster!

I've been asked to create a simple HTML form that submit

Checking if multidimensional array is empty?
I have a for with multiple test input fields. Specifically the user submits multiple names and ages

problem with refreshing
in my site, i have an index page, it has a main div. this main div's content is changing according t

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