String Limit

Just starting out? Need help? Post your questions and find answers here.
loulou25223
User
User
Posts: 32
Joined: Thu Jan 16, 2014 7:07 pm

String Limit

Post by loulou25223 »

Cab someone says me which is the cumulative limits for all variable.
I have a varaible which is 230 Mo lenght
with Regexp i want to create another string
regexp find what i want but don arrvie ti load the result in a string and the programm crash
With a string of 21O Mo all is good
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: String Limit

Post by PB »

Strings are unlimited.

If your app is crashing, post some code that shows it so we
can see what's going on, and then we can either correct your
code or file a bug report.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
loulou25223
User
User
Posts: 32
Joined: Thu Jan 16, 2014 7:07 pm

Re: String Limit

Post by loulou25223 »

I create a variable fill with xml data which is 230 M0
I use Regexp for extraction data which is 210 MO
The Regexp return no error and Nb1 is equal to 1
But wheni want to put the result in variable , variable is 0 lenght and nothing in string
Here is my probleme
With a file of 220 M0 there is no problem, yhese instruction works well and return in variable the good value that's while i find that strange
Thanks PB if you give me a solution

Code: Select all

 If CreateRegularExpression(1,  "(<PmtInf>)(.*)(</CstmrDrctDbtInitn>)" ,#PB_RegularExpression_DotAll | #PB_RegularExpression_MultiLine)
  
  Dim Resultat1$(0)
  Nb1 = ExtractRegularExpression(1, toto23, Resultat1$())
  variable = Resultat1$(nb1-1)
  FreeRegularExpression(1)
EndIf 
User avatar
Crusiatus Black
Enthusiast
Enthusiast
Posts: 389
Joined: Mon May 12, 2008 1:25 pm
Location: The Netherlands
Contact:

Re: String Limit

Post by Crusiatus Black »

Why don't you use the XML functions? You could stream in the large XML file and show
progress, after it has finished, you can process the XML data using the XML functions.
Image
Bas Groothedde,
Imagine Programming

I live in a philosophical paradoxal randome filled with enigma's!
loulou25223
User
User
Posts: 32
Joined: Thu Jan 16, 2014 7:07 pm

Re: String Limit

Post by loulou25223 »

I don't use XML lib because with such big files , i have to pass through all collections and using regexp can be very faster 10 or 12 more speedy
Post Reply