Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news1.dtag.de!feedme.news.telefonica.de!telefonica.de!news.tele.dk!feed118.news.tele.dk!not-for-mail Newsgroups: comp.lang.javascript Subject: Re: Regular expression question References: <2997930.SPkdTlGXAF@PointedEars.de> <1674123.KyhKTayAOI@PointedEars.de> From: Lasse Reichstein Nielsen Date: Fri, 28 Oct 2011 18:50:13 +0200 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Rational FORTRAN, windows-nt) Cancel-Lock: sha1:EeWvkbvlgCOKrGw37tcwEpXWPxU= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 21 Organization: TDC Totalloesninger NNTP-Posting-Host: 87.57.52.80 X-Trace: 1319820615 dtext01.news.tele.dk 294 87.57.52.80:39468 X-Complaints-To: abuse@post.tele.dk Xref: x330-a1.tempe.blueboxinc.net comp.lang.javascript:7794 Thomas 'PointedEars' Lahn writes: > Antony Scriven wrote: >> is also the reason why Lasse's solution (using >> String.prototype.lastIndexOf) is preferable IMHO. --Antony > > http://foo.example/bar My "solution" was very hardcoded to the format that the OP used, i.e., ending in "/somename.html". Since that was all the examples he gave, and no real textual explanation, it's impossible to generalize further. Maybe I should have said that :) /L -- Lasse Reichstein Holst Nielsen 'Javascript frameworks is a disruptive technology'