Use double quote to enclose the quote or escape it.
newTemp = mystring.replace(/"/g, "'");
or
newTemp = mystring.replace(/"/g, '\'');
Related Posts:
- jQuery removing ‘-‘ character from string
- jQuery – replace all instances of a character in a string [duplicate]
- Lua String replace
- Standard function to replace character or substring in a char array?
- What is lexicographical order?
- How to replace all occurrences of a string in JavaScript
- Regex not operator
- working of \n in python [duplicate]
- Regex not operator
- Extract a substring using PowerShell
- Extract substring in Bash
- Regex not operator
- node.js string.replace doesn’t work?
- How to use operator ‘-replace’ in PowerShell to replace strings of texts with special characters and replace successfully
- What is the difference between \r\n, \r, and \n? [duplicate]
- string to string array conversion in java
- What is the difference between \r\n, \r, and \n? [duplicate]
- Regex how to match an optional character
- How to remove punctuation in python?
- Replace part of a string with another string
- How do I properly compare strings in C?
- How to remove .html from URL?
- What is the difference between a “line feed” and a “carriage return”?
- How to convert an int to string in C?
- Python: TypeError: cannot concatenate ‘str’ and ‘int’ objects
- Ignoring upper case and lower case in Java
- how to replace quotation marks with \”
- Best way to replace multiple characters in a string?
- Convert character to ASCII numeric value in java
- What does strcmp() exactly return in C?
- Generate random string/characters in JavaScript
- jQuery if div contains this text, replace that part of the text
- “[ ]” vs. “[[ ]]” in Bash shell
- How to trim whitespace from a Bash variable?
- How to get the filename without the extension from a path in Python?
- sprintf like functionality in Python
- C – The %x format specifier
- How can I remove a character from a string using JavaScript?
- Lua string.format options
- n-grams in python, four, five, six grams?
- Alphabet range in Python
- Best way to replace multiple characters in a string?
- How to trim whitespace from a Bash variable?
- What is the difference between ‘ and ” in JavaScript?
- Center text in fixed-width field with stream manipulators in C++
- C# – Illegal characters in path
- \n or \n in php echo not print [duplicate]
- Mips how to store user input string
- PadLeft function in T-SQL
- bash : Bad Substitution
- How do I check if string contains substring? [duplicate]
- How do I check if string contains substring?
- How can I get the last character in a string?
- How can I get the last character in a string?
- How to assign multiple lines string in Powershell Console
- LC-3 STR with R1 as offset
- Lua read beginning of a string
- How do I print my Java object without getting “SomeType@2f92e0f4”?
- How can I process each letter of text using Javascript?
- Difference between String replace() and replaceAll()
- Split string in jquery
- PHP to write Tab Characters inside a file?
- Replace a character at a specific index in a string?
- Haskell: Converting Int to String
- Remove specific characters from a string in Python
- Escaping HTML strings with jQuery
- Passing string to a function in C – with or without pointers?
- Trim a string in C [duplicate]
- How to remove first character from C-string?
- Difference between char* and char** (in C)
- window.location.replace() not working to redirect browser
- Extract filename and extension in Bash
- Meaning of #{ } in Ruby?
- Removing double quotes from a string in Java
- Replace spaces with dashes and make all letters lower-case
- Taking a new line using printf in java? Is %n correct?
- How to count instances of character in SQL Column
- How do I redirect to another webpage?
- How can I add ” character to a multi line string declaration in C#?
- Why use string::iterator rather than index?
- Jquery change background color
- C++ strings and pointers
- Dynamically load JS inside JS
- jQuery how to find an element based on a data-attribute value?
- jQuery checkbox checked state changed event
- Creating Multiple wp_localize_script for Shortcode?
- How wp_enqueue_script works?
- wp_ajax unauthenticated and authenticated
- JSON output returns page source code [closed]
- Display data on same page as form without refresh
- Error with Image Slide plug-in/ s3slider in WP
- wp_enqueue doesn’t work
- superfish.js seems it is not working properly after wordpress upgarde to 4.6.1
- Stop wordpress from requesting external jquery from googleapi
- Ajax by worpdress affects called jquery inside template file
- Ajax Load more CPT via shortcode
- How to toggle custom WP archive list
- JQuery is not defined but jquery script is loaded in source [closed]
- jQuery AJAX add json2 dependency?
- Sliders with buttons [closed]