Re: Problem with repeating characters in regex



Rob Dixon wrote:

Mike Martin wrote:

$line=~s/\!(^\![A-Z][a-z].+)/$1/gc;

$line =~ s/^!(![a-z].+)/$1/gi;

You are both using an anchored pattern with the /g option which makes no sense unless you are also using the /m option.


John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
.



Relevant Pages

  • Re: missing last line
    ... Perl isn't a toolbox, but a small machine shop where you ... can special-order certain sorts of tools at low cost and ...
    (comp.lang.perl.misc)
  • Re: How to capture repeated subpatterns?
    ... Perl isn't a toolbox, but a small machine shop where you can special-order ...
    (comp.lang.perl.misc)
  • Re: Image Reader
    ... Perl isn't a toolbox, but a small machine shop where you can special-order ...
    (comp.lang.perl.misc)
  • Re: while and last
    ... Perl isn't a toolbox, but a small machine shop where you ... can special-order certain sorts of tools at low cost and ...
    (perl.beginners)
  • Re: What is abriviation for CHR(4)
    ... Perl isn't a toolbox, but a small machine shop where you can special-order ...
    (comp.lang.perl.misc)