in reply to regex replace a string

Hi, welcome, please show:

  1. sample input (in <code></code> tags)
  2. expected output from that input (in <code></code> tags)
  3. code you have tried (in <code></code> tags)
  4. how it fails (in <code></code> tags if it's an error message)

see PerlMonks FAQ: Posting on PerlMonks


The way forward always starts with a minimal test.