Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.chainon-marquant.org!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <22171861.ikSu5bs1Z4@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Thu, 23 Feb 2012 15:12:51 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 7Bit Subject: Re: Replace all strings Newsgroups: comp.lang.javascript References: <0794f674-e437-4d95-87b3-f1580418f1fb@sk8g2000pbc.googlegroups.com> <1938247.aqSPkdTlGX@PointedEars.de> <4c594bd3-157d-4d25-8fe0-b16af3e15249@f14g2000yqe.googlegroups.com> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 34 NNTP-Posting-Date: 23 Feb 2012 15:12:51 CET NNTP-Posting-Host: a371c4a5.newsspool1.arcor-online.net X-Trace: DXC=C_I7l72NiRi9kIfcjg:0fdic==]BZ:afn4Fo<]lROoRa<`=YMgDjhgbS6]dJ=QET;aDZm8W4\YJNlUFDj8T]K0?cDmniOZG;K0kCS5n?=VolZg X-Complaints-To: usenet-abuse@arcor.de Xref: x330-a1.tempe.blueboxinc.net comp.lang.javascript:12097 Captain Paralytic wrote: > Thomas 'PointedEars' Lahn wrote: >> J.R. wrote: >> > On 22/02/2012 17:29, Archos wrote: >> >> On Feb 22, 6:48 pm, "J.R." wrote: >> >>> var a = "a,b,c,d"; >> >>> a.replace(/,/g, '') >> >> Yes, thanks. I hope that the use of regular expressions been right for >> >> main browsers. >> > >> > The "searchValue" argument of the String.prototype.replace method can >> > be a regular expression or not, according to the standards (ECMA-262 >> > Editions 3 and 5, section 15.5.4.11). >> >> More importantly, the RegExp initialiser (sic!) and constructor are > > Why the (sic!)? Because I try to use American English on the Net, but the ECMAScript Language Specification uses British English there (probably because it is published by Ecma International based in Geneva). However, your question has made me look it up again. The correct terms are "Regular Expression *Literal*" (ECMA-262 5.1 Ed., section 7.8.5), "Array Initialiser" (11.1.4) and "Object Initialiser" (11.1.5). Thanks. PointedEars -- Sometimes, what you learn is wrong. If those wrong ideas are close to the root of the knowledge tree you build on a particular subject, pruning the bad branches can sometimes cause the whole tree to collapse. -- Mike Duffy in cljs,