Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #19372
| Newsgroups | comp.lang.javascript |
|---|---|
| Subject | Re: regular expression |
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
| References | <kkrmm2$b4q$1@dont-email.me> <kkrni8$hpi$1@dont-email.me> |
| Date | 2013-04-19 23:33 +0200 |
| Message-ID | <XnsA1A7EFAA9BD88eejj99@194.109.133.133> (permalink) |
Tony wrote on 19 apr 2013 in comp.lang.javascript:
> I fount it
> var mydate = $('#datepicker').val().replace(/\/+/g, '-');
>
> //Tony
> "Tony" wrote in message news:kkrmm2$b4q$1@dont-email.me...
>
> I have 2013/04/03 and I want to replace / with - how to I write that ?
There is no need for the +
var myDate = '2013/04/03'.replace(/\//g,'-');
or
var myDate = '2013/04/03'.replace(/[/]/g,'-');
val() what does that do?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar
regular expression "Tony" <tony.johansson@inport.com> - 2013-04-19 17:11 +0200
Re: regular expression "Tony" <tony.johansson@inport.com> - 2013-04-19 17:26 +0200
Re: regular expression "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-04-19 23:33 +0200
Re: regular expression Christoph Becker <cmbecker69@gmx.de> - 2013-04-19 23:50 +0200
Re: regular expression "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-04-19 23:56 +0200
Re: regular expression Christoph Becker <cmbecker69@gmx.de> - 2013-04-20 00:13 +0200
csiph-web