Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!news.internetdienste.de!noris.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <4132599.O2IUq2hl1o@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Fri, 12 Apr 2013 00:42:11 +0200 User-Agent: KNode/4.8.5 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <7867864.kBbL0iy7tU@PointedEars.de> <2615387.eNcf81pqbo@PointedEars.de> <3115834.VOAWd18DUa@PointedEars.de> <1934436.yJr0pKV1Qq@PointedEars.de> MIME-Version: 1.0 Lines: 59 NNTP-Posting-Date: 12 Apr 2013 00:42:22 CEST NNTP-Posting-Host: 74575f30.newsspool3.arcor-online.net X-Trace: DXC=_NB5;7gN5bUaAeROF2PWMQMcF=Q^Z^V3X4Fo<]lROoRQ8kF On 2013-04-11 23:31, Thomas 'PointedEars' Lahn wrote: >> Stefan Weiss wrote: >>> So it doesn't solve the problem as stated: >>> >>> | block all email addresses from @forbidden.* >>> | (Where * can be org, com. co.uk, se ...... etc) >>> >>> forbidden.planet.example.com is clearly a false positive. >> >> Your logic is flawed. “...... etc” makes it clear that *any* domain name >> whose bottom level is named “forbidden” is to be rejected, including >> forbidden.planet.example.com. > > That's a *very* generous interpretation of "etc". You must be kidding. That (anything of the same sort) is the very meaning of ”etc.” – et cetera – and so on. I do not think the program (or problem) specification could be more clear in that respect: “*” is used as a placeholder here; it is defined by examples afterwards, where the list of examples is _not_ exhaustive, due to “etc.” Much like saying “Even numbers, like 2, 4, 6, etc.” by definition includes 42. > If that's indeed how you read it, the whole problem becomes trivial. > In that case, I wonder why you would prefer a regular expression to > indexOf(). Because – again – indexOf() is _not_ equivalent. >>> To be clear, for the purpose of testing if the domain name >>> part "forbidden" follows the @-sign, >>> >>> if (!(/original-regex/.test(str) && !/your-regex/.test(str))) >>> >>> is equivalent to >>> >>> if (!(/original-regex/.test(str) && str.indexOf("@forbidden.") < 0)) >>> >>> or, with the negated parenthesized expression resolved, >>> >>> if (!/original-regex/.test(str) || str.indexOf("@forbidden.") > -1) >> >> No, it is not. Your logic is flawed. > > Saying "no" and "your logic is flawed" means nothing (especially coming > from you). If you find anything to disprove the statement, let me know; > until then I'll just consider you too stubborn to admit a mistake. No, this is not how a proper discussion works. You are to prove your argument first. You will see then that you are wrong. HTH -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.