Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-28-2006, 11:36 AM
sanderd sanderd is online now
Registered User
 
Join Date: 03-28-2006
Posts: 3
Replace In File - out of stack space

I get this message when trying to do a replace in file...

"Out of stack space, while attempting to match a regular expression."

What does this mean?

I am trying to replace a whole section of XML. In the example below I would be trying to replace the entire XMLNode section.

<XMLNode option option 2>
<InnerNode>
<InnerNode2>
</InnerNode2>
</InnerNode>
</XMLNode>

My Regular expression is the following
<XMLNode(.|\n)*XMLNode>

The only difference between this example and what I am doing is the size of the XML section.
Reply With Quote
  #2  
Old 03-28-2006, 01:07 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Please ZIP and send or post:
1) The info from Help | About | Install Info
2) The .bld file used to build
3) The file replacements are being made in
Reply With Quote
  #3  
Old 03-29-2006, 10:44 AM
sanderd sanderd is online now
Registered User
 
Join Date: 03-28-2006
Posts: 3
Here is the info you asked for.

Thanks
Attached Files
File Type: zip stack_issue.zip (2.9 KB, 1091 views)
Reply With Quote
  #4  
Old 03-29-2006, 10:54 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Using

.*

instead of

(.|\n)*

works.
Reply With Quote
  #5  
Old 03-29-2006, 11:19 AM
sanderd sanderd is online now
Registered User
 
Join Date: 03-28-2006
Posts: 3
Indeed it does. Thanks.

By chance do you know why the other mehtod doesn't work and a stack problem occurs?
Reply With Quote
  #6  
Old 03-29-2006, 03:36 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
I guess the regex engine is running into some internal limit with a large amount of text when processing that expression. This is the regex component used by that action:
http://boost.org/libs/regex/doc/index.html
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 06:58 PM.


Copyright © 1999-2023 Kinook Software, Inc.