in reply to simple pattern matching.

Assuming you have the text in $_:
s!//!/New text/!;

Abigail