in reply to Regex: find/Replace words between tags
and don't cut the extra spaces#!/usr/bin/perl -w while(<DATA>){ $_=~s/^(BEGTITLE.*) (wirey) (.*ENDTITLE)$/\1 smooth \3/i; print $_; } __DATA__ BEGPUB Wirey Haired Dogs Life ENDPUB BEGTITLE My dog has wirey hair ENDTITLE BEGTXT My wirey hair dog...blah, blah. ENDTXT
-- package Lizard::King; sub can { do { 'anything'} };
|
|---|