#!/usr/bin/perl -w use strict; my $text= "start \\chapter{hello}\n end\n"; my $patternreadfromfile= "-- FOUND \$1 -- "; my $inpattern = qr/\\chapter\{(.*)\}/; my $outpattern = q{$patternreadfromfile}; $text =~ s/$inpattern/$outpattern/gee; print "$text\n"; now q{} escapes too much...
In reply to Re^2: simple regular expression
by iaw4
in thread simple regular expression
by iaw4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |