Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-01-22
3
Medium Priority
?
432 Views
Last Modified: 2013-02-06
How do i remove these two special characters [ ]  in a jquery string?
0
Comment
Question by:cbrune
  • 2
3 Comments
 
LVL 83

Expert Comment

by:leakim971
ID: 38806343
example of string?
0
 

Author Comment

by:cbrune
ID: 38806364
[0.034]
0
 
LVL 83

Accepted Solution

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

test page : http://jsfiddle.net/ReAyV/
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

877 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