Skip to content
WJunction - Webmaster Forum

need help with some regex

Status
Not open for further replies.
so, i have this:
Code:
$pattern = '|http[^ ["<\t\n\r\f\v]{1,}|';
        preg_match_all($pattern, $links, $matches);
this code finds the correct links for rs, hf, sharingmatrix but not for fileserve

for fileserve i only get
Code:
http://www.fileser
and my links are
Code:
http://www.fileserve.com/file/afdsaf
http://www.fileserve.com/file/werwq
http://www.fileserve.com/file/wr23
http://www.fileserve.com/file/adsfa
http://www.fileserve.com/file/adsffdsa

how can i get the full fileserve links?

thanks :)
 

1 comment

simples, your using single qoutes, witch means you cannot escape chars because everything is literal.

try

PHP:
$pattern = "#http[^ [\"<\t\n\r\f\v]{0,1}#";
preg_match_all($pattern, $links, $matches);

something like that
 
Status
Not open for further replies.

About the author

T
Active Member · Joined
1,419
Messages
183
Reactions
63
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom