Regular Expressions   «Prev  Next»

Edit file using selective replacement in Perl - Exercise

Objective: Use the s/// operator with subexpressions to perform selective text replacement.

Instructions

Write a program that will insert Re: at the beginning of an email Subject: header.
Do not add a second Re: if you find one already there.
Paste your program code in the text area below. Click the Submit button when you are finished.