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

how can i expire the submitted page using session.
hi,
i'm new to php world.
i'm using "post" method.
when i submit it,data goes to

PHP SUBMIT
Code: <input name="doLogin" type="image" src="images/loginsubmit.jpg

jquery validation in codeIgniter
hai i need to add client side validation to my fiels which are selected in a forloop.the fields are

present value of sequence?
Hi

Please help me to find out the present value of sequence?

Thanks

Concatenate two strings ???
I have string one $string1 and another $string2.

How to concatenate (add) both of them $str

Secure FTP
Hi experts,
There is no SFTP action in MII workbench.
This means it needs developing custo

Is it possible to view php source code??
Hi All

I was just wondering if it's possible to view a websites php source code?
I know

How to secure my login data to my database?
Hi there,

It may be a stupid question but I don't know how to secure my login data to my data

creating a 1 to 100 in a table
hi guys I am a newb in php need some help.

I have a table with 1 column and 100 rows and in

Alterar a hora do servidor
Se alguém souber, ajude-me a adicionar 6 horas, obrigado
<tr>
&

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