Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Difference between these regexes

by haukex (Archbishop)
on Jul 30, 2016 at 10:49 UTC ( [id://1168857]=note: print w/replies, xml ) Need Help??


in reply to Difference between these regexes

Thank you very much, everyone who replied!

Taking all the replies together I think that confirms that the set of strings matched is the same for all three of these particular regexes.

This also confirms my initial suspicion that the regex m{<ReportHost[^>]*>(?:(?!</ReportHost>).)*</ReportHost>}s could also be written as m{<ReportHost[^>]*>.*?</ReportHost>}s.

Regards,
-- Hauke D

Replies are listed 'Best First'.
Re^2: Difference between these regexes
by duyet (Friar) on Jul 31, 2016 at 07:47 UTC
    There are many ways and tools to figure out a regexp. One of them is: http://www.regexr.com/ imho. You can mouse over the regexp to see what it's looking for, and in the result panel you can see the range, group, etc. You might want to try it for the next quest.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-19 01:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found