How do i remove these two special characters [ ]  in a jquery string?

Posted on 2013-01-22
Last Modified: 2013-02-06
How do i remove these two special characters [ ]  in a jquery string?
Question by:cbrune
  • 2
LVL 82

Expert Comment

ID: 38806343
example of string?

Author Comment

ID: 38806364
LVL 82

Accepted Solution

leakim971 earned 500 total points
ID: 38806406
var s = "[0.034]";
s = s.replace(/\[|\]/g, "");
alert( s );

test page :

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jQuery one function to process 3 clicks 7 41
Angular - filter - one works but other doesn't 13 31
combining jquery scripts 3 20
JS Plugin Chaining 2 32
by Julian Matz As of jQuery ( 1.4 the .live() method ( supports custom events as well as some standard JavaScript events that it previously didn't support. Among these is the submit event. Unlike …
Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now