Win32 Non-greedy Regex "\w*?" matches whitespace (tab or space)
When changing the "search for word characters" from greedy to
non-greedy, it starts to match whitespace characters.
Attached is an example program.
If you remove the '?' to make the search greedy, then it (correctly)
doesn't match.
I am using boost 1.31.0, on WinXP using VC7.1.
I have confirmed that this does not occur on my Linux machine.
Also attached is my Jamfile to make sure I didn't just compile it wrong.
It occurs in both debug and release mode.
John
=:->
project-root ;
exe test
: test.cpp
#unit_test_example1.cpp
: <sysinclude>$(BOOST_ROOT)
<stlport-iostream>on
<library-path>$(BOOST_ROOT)/../../lib
When changing the "search for word characters" from greedy to non-greedy, it starts to match whitespace characters. Attached is an example program. If you remove the '?' to make the search greedy, then it (correctly) doesn't match.
I am using boost 1.31.0, on WinXP using VC7.1. I have confirmed that this does not occur on my Linux machine.
Also attached is my Jamfile to make sure I didn't just compile it wrong. It occurs in both debug and release mode.
Works OK with the latest code: if you haven't done so already go over to http://sourceforge.net/project/showfiles.php?group_id=7586 and download the latest patches for Boost.Regex.1.31.0. John Maddock
participants (2)
-
John F Meinel Jr
-
John Maddock