Page 1 of 1

RegEx length limit?

PostPosted: Sat Aug 10, 2002 3:51 am
by complicity
Is there a limit to the length of a regular expression, or some other limitation that I am not aware of? Because sometimes I cannot enter an expression in... for example...

This will take:
(.*\.((JPG)|(MPG)|(MPEG)|(JPEG)|(AVI)|(WMV)))|\([0]+/[0-9]\)

This will not:
(.*\.((JPG)|(MPG)|(MPEG)|(JPEG)|(AVI)|(WMV)))|\([0]+/[0-9][0-9]?[0-9]?\)

Or am I just doing something wrong?

I have other ones that didn't work, but I can't remember the exact syntax.

Even if I edit the filter.xml file, it doesn't appear in NewsBin, although it still shows in the file if I close NB and re-open the xml.

NewsBin 4.01 build 3836, btw

RE: RegEx length limit?

PostPosted: Sat Aug 10, 2002 8:57 am
by dexter
Quade can look up the length limit but in this case, I think our RegEx parser doesn't handle the ? expression. I'll play with it and see.

RE: RegEx length limit?

PostPosted: Sat Aug 10, 2002 12:27 pm
by complicity
I thought that may have been the problem as well, but it says it handles it on this page www.newsbin.com/regexp.htm and also, I have other expressions which use it and they work. They are also longer, which is strange.

Here is one using ? that works, or at least that NB accepts (and it's also longer)...

(.*\.((RAR)|(PAR)|(NFO)|(SFV)|(ZIP)|([P-Z][0-9][0-9])|([0-9][0-9][0-9])))|\([0]+/[0-9][0-9]?[0-9]?\)

RE: RegEx length limit?

PostPosted: Sat Aug 10, 2002 2:31 pm
by Quade
While this doesn't answer the question, since it's going into the filters.xml, why not add it as multiple lines worth of regex?

RE: RegEx length limit?

PostPosted: Sat Aug 10, 2002 6:40 pm
by complicity
Well, that's what I HAVE done, I'm just wondering why certain combinations of regex don't seem to take, since it now seems not to necessarily be tied to the length of the expression... curious...

I'll get over it. Image link not allowed for unregistered users