|
Home > Archive > Unix Programming > May 2005 > regular expression compilation aborted
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
regular expression compilation aborted
|
|
| torpedo@bluebottle.com 2005-05-10, 7:49 am |
| Hi folks,
I have the problem regarding the compilation of the regular expression.
I have given the regular expression as follows:
" (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct
|Nov|Dec) ([ 0-9][0-9])
([0-9][0-9])(.*)"
and regcomp() function call gets aborted ( i think it is because of the
increased memory consumption at the time of regular expression
compilation ).
What is the reason behind this ?
Please put some light on the problem,
Thanks in advance,
torpedo
| |
| Pascal Bourguignon 2005-05-10, 7:49 am |
| torpedo@bluebottle.com writes:
> Hi folks,
>
> I have the problem regarding the compilation of the regular expression.
>
> I have given the regular expression as follows:
>
> " (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct
|Nov|Dec) ([ 0-9][0-9])
> ([0-9][0-9])(.*)"
>
> and regcomp() function call gets aborted ( i think it is because of the
> increased memory consumption at the time of regular expression
> compilation ).
> What is the reason behind this ?
I don't observe undue memory consumption. This regexp is one of the simpliest.
[1]> (room)
Bytes permanently allocated: 90432
Bytes currently in use: 3061472
Bytes available until next GC: 1500436
3061472 ;
1500436
[2]> (regexp:regexp-compile " (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct
|Nov|Dec) ([ 0-9][0-9]) ([0-9][0-9])(.*)" :extended t)
#<FOREIGN-POINTER #x081F5290>
[3]> (regexp:regexp-exec * "Aug 12 1932")
#S(REGEXP:MATCH :START 0 :END 11) ;
#S(REGEXP:MATCH :START 0 :END 3) ;
#S(REGEXP:MATCH :START 4 :END 6) ;
#S(REGEXP:MATCH :START 7 :END 9) ;
#S(REGEXP:MATCH :START 9 :END 11)
[4]> (room)
Bytes permanently allocated: 90432
Bytes currently in use: 3106560
Bytes available until next GC: 1455348
3106560 ;
1455348
[5]>
--
__Pascal Bourguignon__ http://www.informatimago.com/
Wanna go outside.
Oh, no! Help! I got outside!
Let me back inside!
| |
| torpedo@bluebottle.com 2005-05-12, 2:59 am |
| Ooops ...
Sorry, the problems was lying somewhere else!
I was doing some illigal memory reference.
Thank you very much.
torpedo
|
|
|
|
|