You're probably looking for something like this.
A small example...
<?php
$string = $_POST['body'];
$string = ereg_replace("[url-](.*)[/-url]", "<a href='/\\1'>/\\1</a>", $string);
?>
Keep in mind, this is a -very- basic example, and you should make a much better regex pattern than that, but you get the basic idea.
[note]
A little note, the /\1 things, are supposed to be \1