Assuming you are doing just one string at a time:
$regex = "/(\[i:)(\w+)(\])/i";
preg_match($regex, $str, $matches);
print $str;//original string
print substr($matches[2], 1, 3);//trimmed string
?>
Gryffyn, Trevor wrote:
If the format is consistantly the same, try this:
$somedata = "[i:aslkdfj]";
If the format is consistantly the same, try this:
$somedata = "[i:aslkdfj]";
$insidedata = substr($somedata,3,strlen($somedata)-4);
-TG
> -Original Message-
> From: Student [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 17, 2004 11:42 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subje
2 matches
Mail list logo