[regex] Strange behavior with greediness operators?
All: I think I'm seeing strange behavior with the greediness operators in Boost.Regex (1.33.1, Mac OS 10.4.6), but was hoping someone could confirm that I'm using them correctly. For example, the following two calls: find_matches(".*a href=(.*?)>", "<html><head><title>test</title></head><body>this is a test<br/><a href=testlink.html><br/>more text</body></html>"); find_matches(".*a href=(.*)>", "<html><head><title>test</title></head><body>this is a test<br/><a href=testlink.html><br/>more text</body></html>"); Produce the same output: Expression: ".*a href=(.*?)>" Text: "<html><head><title>test</title></head><body>this is a test<br/><a href=testlink.html><br/>more text</body></html>" ** Match found ** Sub-Expressions: $0 = "<html><head><title>test</title></head><body>this is a test<br/><a href=testlink.html><br/>more text</body></html>" $1 = "testlink.html><br/>more text</body>