in reply to Re: Substitution for braces
in thread Substitution for braces
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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Substitution for braces
by Corion (Patriarch) on Jul 09, 2009 at 06:59 UTC | |
by gem555 (Acolyte) on Jul 09, 2009 at 08:43 UTC | |
by Corion (Patriarch) on Jul 09, 2009 at 08:50 UTC | |
by gem555 (Acolyte) on Jul 09, 2009 at 09:33 UTC | |
by Corion (Patriarch) on Jul 09, 2009 at 10:10 UTC |