Re: [pcre-dev] Match for the first 100 charaters of a string

Kezdőlap
Üzenet törlése
Szerző: Zoltán Herczeg
Dátum:  
Címzett: Sandhya Sriraj
CC: pcre-dev
Tárgy: Re: [pcre-dev] Match for the first 100 charaters of a string
Hi,

I am not sure I totally understand your mail. You have a string, which length is 1G, and you want to display the first 1000 characters, and replace literals (characters?) with another symbol, is that correct? Why do you need pcre for this purpose? A simple loop which checks every character could do that, and it would be much faster. Or you can simply pass a length of 1000 to stop pcre after the 1000th character.

Regards,
Zoltan

Sandhya Sriraj <sandhyar1984@???> írta:
>Hi,>

I want to display first 1000 characters of a string (literals are replaced>
by special symbol). I am using pcre library to replace the literal. After>
replacing every literal I am checking for the length of the string and if>
it is > 1000 then stop matching and display the string.>
>

My problem is, Suppose I am sending a string with length 1GB, and if there>
is no literal in that string, pcre will check for the entire string. I want>
to check the match for first 1000 charaters. Is there any way to do this?>
>
>
>

Regards,>
Sandhya Sriraj>
-- >
## List details at https://lists.exim.org/mailman/listinfo/pcre-dev >