Step one (a): use one regex with a [char-class] with '\ and so on
Step one (b): combine others with or-clauses in your regex (A|B)
Step two: process more than one line at a time by joining them together.
added (one b)
In reply to Re^3: Smart match & substitution (matching isn't substitution)
by LanX
in thread Smart match & substitution
by OceanPerl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |