in reply to Non-greedy regex behaves greedily

try:s/<body[^>]*?>/<body class="theBody">/ update
## I changed +? ## to *? ## now it does match

pelagic

Replies are listed 'Best First'.
Re^2: Non-greedy regex behaves greedily
by fourmi (Scribe) on Nov 10, 2004 at 12:13 UTC
    Now it doesn't match <body> at all
      yup, core error on my part, thanks a lot!