Forum Moderators: coopster
I have a series of strings... some are full urls starting with http.
others are just like ../folder/image.gif
while others are "images/here.gif" etc
I'm thinking I need to use something like preg_match?
But I'm not so familiar with it.
An example I found is like
#===============================================
<?php
$subject = "abcdef";
$pattern = '/^def/';
preg_match($pattern, substr($subject,3), $matches, PREG_OFFSET_CAPTURE);
print_r($matches);
?> I know the carrot sign (up arrow) needs to be used to check stuff at the beginning.
Any help is appreciated.
Thanks.
-J