views:

21

answers:

0

Possible Duplicate:
splitting a string in js where a pattern DOES NOT match?

i want to replace the lines with "!REPLACED!" from the text similar to this but those which does not match URL pattern or in simple words, which does not begin with http:// or httpS://

Some Good Tutorials

http:// a.com/page1

http:// a.com/page2

Some Good Images

http:// i.com/p1

http:// i.com/p2

Some Good Videos

http:// m.com/p1

http:// m.com/p2

for example i want the above text replaced like this:
!REPLACED!

http:// a.com/page1

http:// a.com/page2

!REPLACED!

http:// i.com/p1

http:// i.com/p2

!REPLACED!

http:// m.com/p1

http:// m.com/p2

using javascript regex, can anyone tell me how to do this?