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

smart reading from a text file
Hello there fellow coders, i was wondering if one of you wouldnt mind helping me with this problem i

North Face Dame Denali Fleece Jakke Sort Grøn - DKK 995 : det nordlige ansigt, thenorthfacejackets.cn
[b][url=http://www.thenorthfacejackets.cn/da/]butik nord face outlet[/url][/b] [b][url=http://www.th

Error in Configure System Landscape Directory phase
Hi

We are getting the error in Configure SLD phase ( 41 of 44 phase).

Please f

Timberland Heren Roll Top Wit Grijs 16036 Boots - €133.92 : Timberland outlet, timberlandforsale.top
[b][url=http://www.timberlandforsale.top/nl/]Timberland.[/url][/b][b][url=http://www.timberlandfors

NorthFace | North Face Jackets Outlet Online
[b][url=http://www.northface-outlet.me/no/]The North Face[/url][/b] [b][url=http://www.northface-out

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Google+ Indyaspeak @ Pinterest RSS