Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #19472

Re: Regular expression

From Denis McMahon <denismfmcmahon@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: Regular expression
Date 2013-04-25 18:05 +0000
Organization A noiseless patient Spider
Message-ID <klbr98$2pp$1@dont-email.me> (permalink)
References <klbk00$8ks$1@dont-email.me>

Show all headers | 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


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