[Rejected] Opinions requested: extending filter syntax (2)

Various discussions related to Adblock Plus development
User avatar
Peng
Posts: 518
Joined: Fri Jun 09, 2006 8:14 pm
Location: Central Florida
Contact:

Post by Peng »

Wladimir Palant wrote:Sorry Peng, it really isn't that simple, regular expressions syntax is pretty complicated to parse. Also, the new syntax has an advantage over regular expressions: reading "http://ad\d.server.com/" is easier than reading "/http://ad\d\.server\.com/". The dot is most problematic when writing regular expressions, it is very common in addresses and escaping it makes the filter hard to read (not to mention that forgetting to escape the dot is a very common mistake). Regular expressions also seem to encourage filters like "///([^/]+\.)?ad(ima?ge?|manager|se?rv.*|stream|v|vert.*|x)?s?-?\d*\.(?!.+\.edu|jp/|$)/", something I want to get rid of.

In the end nobody is forced to use the new syntax, if it is only used by the deregifier and the (still theoretical) automatic filter generator - I am fine with it.
Hmm, all right. The readability is a good point.

Sounds good, then. It'll be nice to be able to replace "*" with "\d{+}" in a few of my simple filters to be more exact. :)
Matt Nordhoff
User avatar
Lucas Malor
Posts: 72
Joined: Wed Aug 23, 2006 7:34 am
Contact:

Post by Lucas Malor »

Well, I'm against "Predefined character classes and special characters". I think it's more useful to add an "any character" selector (the point in js regexp).

For quantifiers...there's a real need?
{n,m} is very useful, and "{?}" could be good. But "{+}" can be rendered with "{1,}" as well; and I find {*} completely useless :P

EDIT: probably you can consider it a huge work ^_^ but a coloured/highlighted syntax could be fine
Wladimir Palant

Post by Wladimir Palant »

Looks like with the work done in http://adblockplus.org/forum/viewtopic.php?t=3344 this is no longer necessary - we already have the most important cases covered and additional flexibility would just make filters unnecessary complex. Any objections?
User avatar
Lucas Malor
Posts: 72
Joined: Wed Aug 23, 2006 7:34 am
Contact:

Post by Lucas Malor »

Well, personally I use often .{n,m} in js regexps. So I would like to see them in AD+ regexp syntax, as I posted before.
Wladimir Palant

Re: Opinions requested: extending filter syntax (2)

Post by Wladimir Palant »

Marking as rejected, there doesn't seem to be enough demand for this.
Locked