正则表达式[关闭]

i want the best regular expression to replace this code

<a href="http:// www.badoobook.com/clips/index.php?page=videos&section=view&vid_id=100162">
www.badoobook.com/clips/inde......&vid_id=100162
</a>

from string when the number 100162 is variable


this code make what i want but for youtube ,

$badoo = '\\4';
preg_replace('#(<a href="http://www.youtube.com)?/(v/([-|~_0-9A-Za-z]+)|watch\?v\=([-|~_0-9A-Za-z]+)&?.*?)">(http://www.youtube.com)?/(v/([-|~_0-9A-Za-z]+)|watch\?v\=([-|~_0-9A-Za-z]+)&?.*?)<\/a>#i', $badoo , $post['message']);

i want like it for my own url ,

thanks

If the rest of the url never changes, then you don't need a regular expression. Just store the first part of the url in a string:

$url_prefix = "http:// www.badoobook.com/clips/index.php?page=videos&section=view&vid_id=";

then append your identifier to it:

$id = 100162; 
$full_url = $url_prefix + $id;