I have s php script:
I am trying to extract all the numberplates and their prices i.e. C16 AAAŁ399PHP Code:<?
$string = "C16 AAAŁ399<abcd-efghijklmnopqrstuvwxyz123>E-mail a FriendD 16 AAAŁ499<abc
defghijklmnopqrstuvwxyz123>E-mail a FriendG16 AAAŁ499<abcdefghijklmnopqrst
uvwxyz123>E-mail a FriendN16 AAAŁ250<abcdefghijklmnopqrstuvwxyz123>E-mail
a FriendP16 AAAŁ250<abcdefghijklmnopqrstuvwxyz123>E-mail a FriendT16 AAAŁ
250<abcdefghijklmnopqrstuvwxyz123>E-mail a FriendV16 AAAŁ399<abcdefghijkl
mnopqrstuvwxyz123>E-mail a FriendW16 AAAŁ399<abcdefghijklmnopqrstuvwxyz12
3>E-mail a FriendX16 AAAŁ499<abcdefghijklmnopqrstuvwxyz123>E-mail a Friend
Y16 AAAŁ499<abcdefghijklmnopqrstuvwxyz123>E-mail a Friend<br><br>";
preg_match("^[A-Z].*",$string, $regs);
echo $regs;
?>
and all the others. I figured the only way to do this is with regxps so i stuck all the info above into $script, and then tried to do some regxp'ing. To start off with i tried:
preg_match("^[A-Z].*",$string, $regs);
echo $regs;
I thought this should have worked as the first letter is C, but i got this message in my browser:
Warning: No ending delimiter '^' found in c:\wampp1-smart\htdocs\sms\regs.php on line 13
Array
I have also tried using a dollar sign infront of the asterix, and doing the script without the ^ sign, but nothing works.
Anyone know why?


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks