In order to use $
in resulting string, use $$
as $
has special meaning in JavaScript Regular Expressions and String replace
method: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter
More Related Contents:
- How do I get the difference between two Dates in JavaScript?
- Calling a JavaScript function returned from an Ajax response
- how to split the ng-repeat data with three columns using bootstrap
- get client time zone from browser [duplicate]
- Uncaught SyntaxError: Unexpected token with JSON.parse
- Hide select option in IE using jQuery
- What’s the difference between returning value or Promise.resolve from then()
- How to write an inline IF statement in JavaScript?
- What is “callback hell” and how and why does RX solve it?
- execute function after complete page load [duplicate]
- how do I compare 2 functions in javascript
- Best way to obfuscate an e-mail address on a website?
- How to stringify inherited objects to JSON?
- HTML5 Drag and Drop anywhere on the screen
- Chrome and probably Opera sort object properties automatically
- Global JavaScript Variable Scope: Why doesn’t this work?
- How can I tell AngularJS to “refresh”
- How to allow Chrome to access my camera on localhost?
- HTML5 / Javascript – DataURL to Blob & Blob to DataURL
- Wrapping Text in D3
- How to avoid extra wrapping in React?
- Node.js request CERT_HAS_EXPIRED
- How can I get all a form’s values that would be submitted without submitting [duplicate]
- Selenium: Scroll to end of page in dynamically loading webpage
- Track campaigns with Google Analytics without query string parameters?
- Access object property in array of objects
- how to auto select an input field and the text in it on page load
- Generating sound on the fly with javascript/html5
- Can I do SendKeys in Javascript?
- What’s the purpose of a leading pipe when declaring a type on Typescript