```
<?php
$data='123
[test=abc]cba[/test]
321';
$test = preg_replace("(\[test=(.+?)\](.+?)\[\/test\])is","$1",$data);
echo $test;
?>

```

I expect the above code to return 
`abc`
but instead of returning `abc` it returns
`123 abc 321`
Please tell me what I am doing wrong.