On Jun 6, David Gilden said:
>s/l\w+/[]gsx;
>
>File "untitled 15"; Line 6: Substitution replacement not terminated.
That regex is malformed. Please see chapter 7 ("Substitution") of
"Regular Expressions in Perl"[1], and note the following excerpt:
As with m//, you can use a character other than "/" as the delimiter.
The same behavior of s''' and s??? (like m'' and m??) exist. If you
use a matching pair of delimiters (like ()) for the left-hand side, then
you can use another pair for the right-hand side, or you can use another
character entirely:
s!foo!bar!;
s{foo}[bar];
s{foo}/bar/;
You should choose delimiters that make sense, and do not cloud or
obfuscate the meaning of the expression.
[1] http://www.pobox.com/~japhy/docs/book.html
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
I am Marillion, the wielder of Ringril, known as Hesinaur, the Winter-Sun.
Are you a Monk? http://www.perlmonks.com/ http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc. http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter. Brother #734
** Manning Publications, Co, is publishing my Perl Regex book **