in reply to A newbie's question in regex
$text = <<'EOT'; I am IntErEsted in making changes to the following lines. However, START thE chAnges mUst bE \CME madE hErE. END There may be cases whErE START chAngEs nEEd to be mAdE hErE tOO. END EOT ;; $text =~ s[START(.+?)END]{ 'START' . join('', map{ /^\\/ ? $_ : lc } split /(\s+)/, $1 ) . 'END' }smge;; print $text;; I am IntErEsted in making changes to the following lines. However, the changes must be \CME made here. There may be cases whErE START changes need to be made here too. END
|
|---|