Update: the fixed regex (removed the colon in "(?:i)") works to capture the script tags and their enclosure and remove it from the string.  Mac OS X 10.5.2 Xcode 3.0 on an Intel Core Duo 2 Macbook Pro.

The console transcript from Xcode (I added some text to embellish the output and print the original string before replacement):

[Session started at 2008-03-12 09:36:10 -0700.]

Original String: <html><head><script src="script.js"></script><title>Some title</title></head><body>Hello, world!</body></html>

New String: <html><head><title>Some title</title></head><body>Hello, world!</body></html>


The Debugger has exited with status 0.


On 3/12/08, John Maddock <john@johnmaddock.co.uk> wrote:
Dave DeLong wrote:
>> My platform is Mac OS X 10.5.2.  I'm compiling and running via Xcode
>> 3.0.  Boost is version 1.34.1 (I installed it in the last two weeks).
>> It was compiled on this machine by running "sudo make install", which
>> installed it in /usr/local/include/boost.  The library files are in /
>> usr/local/lib.  In my project specification, I specify those paths in
>> my Library and Header search paths, and also add the linker option "-
>> lboost_regex".
>>
>> The following code gets a EXC_BAD_ACCESS error and never executes the
>> catch blocks:  (I realize that the pageSource doesn't actually have a
>> <script> tag;  That's because I don't know if the pages I'll be
>> parsing will have one.  However, the code still fails even if there
>> is a <script>TESTSCRIPT</script> tag in there.)

Works for me on Win32 and VC++, I don't have a Mac so I can't try it there.
I mis-wrote the regex BTW, it should be
"(?i)<script[^>]*>.*?</script[^>]*>".

This still looks like you're linking to something that isn't binary
compatible with your application: but I don't know enough (or indeed
anything) about MacOS to be able to help with that.

John.

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users