Hi, I have a variable with the text 1111 1111 3333 4444 and I want to pass it to another variable replacing the blanks by -
1111-1111-3333-4444
I thank you very much for the help
replace character in string
Re: replace character in string
Hi,
an example :
an example :
Code: Select all
var re = / /g;
var chn_1 = "1111 1111 3333 4444";
var chn_2 = chn_1.replace(re,'-');
Console.print(chn_2)
Re: replace character in string
thank you very much francois
Re: replace character in string
Google translation.
Hello,
For beginners information: to learn javascipt, I recommend the site MDN web docs (from Moz://a).
link: https://developer.mozilla.org/en-US/doc ... /@@replace
This case study is very well explained.
Cordially.
MDLE46
Hello,
For beginners information: to learn javascipt, I recommend the site MDN web docs (from Moz://a).
link: https://developer.mozilla.org/en-US/doc ... /@@replace
This case study is very well explained.
Cordially.
MDLE46
Re: replace character in string
Google translation
And the direct link for javascript methods : https://developer.mozilla.org/en-US/docs/Web/JavaScript
Cordially.
MDLE46.
And the direct link for javascript methods : https://developer.mozilla.org/en-US/docs/Web/JavaScript
Cordially.
MDLE46.