Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > BOOK: Beginning Regular Expressions
|
BOOK: Beginning Regular Expressions
This is the forum to discuss the Wrox book Beginning Regular Expressions by Andrew Watt; ISBN: 9780764574894
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Regular Expressions section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 17th, 2009, 08:19 AM
Registered User
 
Join Date: Aug 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with withespace in regular expression

I have the following simple code:

std::string str = "This is a simple test"
std::tr1::cmatch res;
std::tr1::regex rx("a(\\s+)sim");
std::tr1::regex_search(str.c_str(), res, rx);

which compiles correctly but fails at execution time at the 3rd line with the following message:
Debug Assertion Failed!
Program test.exe
File f:\dd\vctools\crt_bld\self_x86\crt\src\dbgheap.c line 1511
Expression: _CrtIsValidHeappointer(pUserData)

Every other expression that does not contain \\s+ executes properly, but this one does not. I have tried the same with boost and it has teh same problem.

Any idea what could be wrong?

Last edited by menashe; August 17th, 2009 at 08:40 AM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular Expression repeat problem Indo77 ASP.NET 2.0 Basics 1 May 28th, 2008 06:45 AM
Regular expression problem keyvanjan ASP.NET 2.0 Basics 0 May 28th, 2007 12:19 PM
regular expression problem muki XSLT 2 January 11th, 2006 06:04 AM
Regular expression problem ghalebro PHP How-To 1 August 24th, 2004 08:10 AM
Regular Expression problem Mitch PHP How-To 2 May 14th, 2004 07:43 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.