Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #19472
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Denis McMahon <denismfmcmahon@gmail.com> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Regular expression |
| Date | Thu, 25 Apr 2013 18:05:28 +0000 (UTC) |
| Organization | A noiseless patient Spider |
| Lines | 16 |
| Message-ID | <klbr98$2pp$1@dont-email.me> (permalink) |
| References | <klbk00$8ks$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Thu, 25 Apr 2013 18:05:28 +0000 (UTC) |
| Injection-Info | mx05.eternal-september.org; posting-host="c3be9b224bb2ad9322d2f28266b083d1"; logging-data="2873"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yotPAsBHQvv5h6ep2Cwwp6qEzUyQhjMw=" |
| User-Agent | Pan/0.136 (I'm far too busy being delicious; GIT 926a150 git://git.gnome.org/pan2) |
| Cancel-Lock | sha1:1uKjIhborUJScyooo1c3j9iFbzA= |
| Xref | csiph.com comp.lang.javascript:19472 |
Show key headers only | View raw
On Thu, 25 Apr 2013 18:04:12 +0200, Tony wrote:
> So how should I write to replace - with / in the pattern
s = s.replace( /-/g, "/" );
JavaScript[0] regex is *not* pcre, and brackets or braces "(" and ")" to
capture subsets of the re is not supported.
See http://www.sined.co.uk/tmp/jsregex.htm for a possible solution.
[0] Before you even start on the fact I said "JavaScript", just fuck off
now pointy thing!
--
Denis McMahon, denismfmcmahon@gmail.com
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Regular expression "Tony" <tony.johansson@inport.com> - 2013-04-25 18:04 +0200
Re: Regular expression Scott Sauyet <scott.sauyet@gmail.com> - 2013-04-25 10:07 -0700
Re: Regular expression "Tony" <tony.johansson@inport.com> - 2013-04-26 11:27 +0200
Re: Regular expression Denis McMahon <denismfmcmahon@gmail.com> - 2013-04-25 18:05 +0000
Re: Regular expression Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-04-25 21:02 +0200
Re: Regular expression Scott Sauyet <scott.sauyet@gmail.com> - 2013-04-26 11:15 -0700
Re: Regular expression Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-04-26 21:17 +0200
csiph-web