At it's simplest, you can perform a non-greedy search for everything beginning with "<script" and ending with "</script>".
$pattern = '/(<script.*</script>)/iU';
The trailing iU mean "case insensitive, non-greedy".
I haven't tested this, but it should give you a decent starting point for you to build from.