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

Various discussions related to Adblock Plus development

Postby Peng » Fri Jan 19, 2007 6:31 am

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
Peng
 
Posts: 518
Joined: Fri Jun 09, 2006 8:14 pm
Location: Central Florida

Postby Lucas Malor » Tue Apr 01, 2008 8:43 am

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
User avatar
Lucas Malor
 
Posts: 72
Joined: Wed Aug 23, 2006 7:34 am

Postby Wladimir Palant » Thu May 07, 2009 12:57 pm

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?
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Postby Lucas Malor » Thu May 28, 2009 1:30 pm

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.
User avatar
Lucas Malor
 
Posts: 72
Joined: Wed Aug 23, 2006 7:34 am

Re: Opinions requested: extending filter syntax (2)

Postby Wladimir Palant » Sun Jun 06, 2010 4:51 pm

Marking as rejected, there doesn't seem to be enough demand for this.
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Previous

Return to Adblock Plus development

Who is online

Users browsing this forum: No registered users and 2 guests