Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Non-greedy regex behaves greedily

by pelagic (Priest)
on Nov 10, 2004 at 12:06 UTC ( [id://406652]=note: print w/replies, xml ) Need Help??


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!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://406652]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-18 06:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found