This prints out (&|&). But replacing of & and & doesnot gets replaced with '-'.#!/usr/bin/perl while ($line = <DATA>){ $line =~ s/<cc>([\s\S]+?)<\/cc>/defined ($1) ? "(&amp;|&)" : ' +-'/eg; print $line; }
In reply to Re^2: Substitution for braces
by gem555
in thread Substitution for braces
by gem555
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |