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

Session
I am having a little trouble with a session. Not sure if it is my browser or what. I know I do not

Setting condidtions for an input box
Hi all,

I would like to set a condition in a txt box that says the number a user enters has t

mySQL and PHP search
Hello,
I am trying to code a project and ran into a brick wall with one of my pages. I am pretty

Display last record first.
I need some help how put the last record first and first record last.

Thanks

Code: &am

Problem!
I have another problem, when i run this code i get this error "Parse error: syntax error, unexp

records between 2 dates
Hello all,

I have a date tracked table which contains effective_start_date and effective

! = ''
In the following 'IF' statement if v_ompcat = PU for example then Oracle equates that 'IF' statement

mails going in spam??
The mails I sent to folks in my database using mail(function) are going in spam??

Any idea ho

Log $_POST
How would i log submits on a form, by everyone? I want to then echo the number of submissions.

Buggy registration system
Hey, I just started scripting in PHP, and I ran into a few problems.
Code: <?php
includ

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