I have made my self a custom javascript syntax highlighter
<p id="data">// return
function getdata() {
// return hi
return "Hi";
}</p>
data = $('p#data').html();
data = data.replace(/\/\/.*$/gm, "<font color=#878A85>$&</font>");
data = data.replace(new RegExp(getRegx('return'), 'gmi'), "<font color=#C97F00>$&</font>");
$('p#data').html(data);
Now, what my problem is that it will replace the return keyword in the comments also is there a way to avoid this and how do i number each line i don't want to use any pre built script because i am only going to use php script i don't want more stuff.