471,831 Members | 1,598 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,831 software developers and data experts.

how to eliminate dot (".") in property money

77
hello all, i have this situation, i have this script below

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.  
  3. var money="45.000.000";
  4. document.write(str.replace(/./, ""));
  5.  
  6. </script> 
You see, i want to eliminate the element "." in variable money with replace reference, but it didn't work..

any idea/ solution?
May 1 '09 #1

✓ answered by acoder

The dot is a special character, so you have to escape it:
Expand|Select|Wrap|Line Numbers
  1. /\./

1 1239
acoder
16,027 Expert Mod 8TB
The dot is a special character, so you have to escape it:
Expand|Select|Wrap|Line Numbers
  1. /\./
May 1 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

11 posts views Thread by Der Andere | last post: by
5 posts views Thread by Mark Hannon | last post: by
4 posts views Thread by Bill Borg | last post: by
23 posts views Thread by Abhi | last post: by
aboka
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.