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

Detail Expenses Report by Cost Center
I would like to obtain a report out of SAP that shows a list of expenses by cost center that shows t

php automatically escaping single quotes
I'm trying to test out my security a bit and I've noticed that php is escaping my single quotes. For

asking for direction
I have 2 tables in my data, which are "post" and "event"
I won't make a summa

Help with writing "$" with fopen
I just can't get my syntax correct. Could someone help me please? I am trying to write a connect fil

need help with mail()
hi i want to send an email with attaching pdf file using php. i have the following script but the pr

form submit at godaddy?
Trying to test form submission at GoDaddy and it does not seem to work. Here's the page...

h

url- go to webpage
i have an input text field and submit button.

how do i make the url entered into the textfiel

How to give the privillege for triggers?
Hi,

How to give the privillage for triggers to particular user?

Please let me

problem when runing a funciton
I am trying to connect to database using a funciton in a functions.php

<?php
funct

A little help in c#
i am doing a simple paint program using c# i want to draw with the mouse so i wrote the code of 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