MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: StringCases kills Kernel

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80821] Re: StringCases kills Kernel
  • From: dh <dh at metrohm.ch>
  • Date: Mon, 3 Sep 2007 06:12:04 -0400 (EDT)
  • References: <fb5nv5$8g8$1@smc.twtelecom.net> <fb834d$7rj$1@smc.twtelecom.net> <fbaral$qkl$1@smc.twtelecom.net>


Hi Wim,

please execute:

s= StringJoin[Table["0123456789", {10^5}]];

StringCases[s, RegularExpression["(0123456789)+"] ];

or

s= StringJoin[Table["0123456789", {10^5}]];

StringCases[s, "0123456789" .. )];

I then  hear a beep, and clicking "Help/Why the Beep?" I am told  that 

the kernel was killed.

If this does not happen in your case, it may be  that it depends on the 

RAM available. I have 1GB.

Daniel





dh wrote:

> Hi Wim,

> 

> you have to execute both statements. The first one gives "s" a value.

> 

> Daniel

> 

> 

> 

> Wim W. Wilhelm wrote:

> 

>> Hi Daniel,

> 

>> I tried the example in version 6. The 

> 

>> following warning was displayed:

> 

>> "String or list of strings expected at 

> 

>> position 1 in \

> 

>> StringCases[s,RegularExpression[\!\(\"(0123456789)+\"\)]]"

> 

>> The Kernel wa's not killed.

> 

>> Wim W. Wilhelm

> 

> 

>> "dh" <dh at metrohm.ch> wrote in message 

> 

>> news:fb5nv5$8g8$1 at smc.twtelecom.net...

> 

> 

>>> Hello,

> 

> 

>>> I often read a file into a string and 

> 

>>> use StringCases to extract

> 

> 

>>> relevant information. However, if the 

> 

>>> extracted part is too large, the

> 

> 

>>> kernel is killed. This happens in 

> 

>>> version 5 and 6. here is a simple

> 

> 

>>> example:

> 

> 

>>> s= StringJoin[Table["0123456789", 

> 

>>> {10^5}]];

> 

> 

>>> StringCases[s, 

> 

>>> RegularExpression["(0123456789)+"] ];

> 

> 

>>> the same also happens when we use a 

> 

>>> StringPattern:

> 

> 

>>> StringCases[s3, "0123456789" ..];

> 

> 

>>> Daniel

> 

> 

> 

> 

> 

> 

> 

> 

> 




  • Prev by Date: Re: Re: rotating rings illusion
  • Next by Date: Re: PSLQ
  • Previous by thread: Re: date format
  • Next by thread: Re: StringCases kills Kernel