Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

regexp too big

Status
Not open for further replies.

Graziella

Programmer
Jul 8, 2004
38
AT
Hi,

I get an error message at a certain point in my code because evidently the regex is too large.
How can I know what the size of a regex is so that I can skip processing it ?

Thank you,

Grazia
 
why dont you try to make it smaller?
or divide it in smaller parts?
 
can you show us your regex and tell us what you want to do?
 
I solved the problem:
The regex became large because in my code I had

foreach $item (@array) {
#.....
#......
if (certain condition){
quotemeta ($item);
}
#........
}

So, it ended up being "quotemeta"-ed in a loop and I had to undef it at a certain point.

Grazia
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top