{"json_modified": "2014-07-04T05:36:16.334337", "slug": "JavaScript/Reference/Global_Objects/String/replace", "tags": [], "locale": "zh-TW", "title": "String.prototype.replace()", "translations": [{"locale": "zh-CN", "localization_tags": ["inprogress"], "last_edit": "2014-06-24T23:11:02", "url": "/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/replace", "title": "replace"}, {"locale": "en-US", "localization_tags": [], "last_edit": "2014-07-01T14:09:35", "url": "/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace", "title": "String.prototype.replace()"}, {"locale": "ja", "localization_tags": [], "last_edit": "2014-05-23T23:54:32", "url": "/ja/docs/Web/JavaScript/Reference/Global_Objects/String/replace", "title": "String.prototype.replace()"}, {"locale": "es", "localization_tags": [], "last_edit": "2014-07-03T08:49:43", "url": "/es/docs/Web/JavaScript/Referencia/Objetos_globales/String/replace", "title": "replace"}, {"locale": "ru", "localization_tags": [], "last_edit": "2014-07-03T07:23:11", "url": "/ru/docs/Web/JavaScript/Reference/Global_Objects/String/replace", "title": "replace"}, {"locale": "fr", "localization_tags": [], "last_edit": "2014-06-13T11:30:34", "url": "/fr/docs/Web/JavaScript/Reference/Objets_globaux/String/replace", "title": "String.prototype.replace()"}], "modified": "2014-07-04T05:35:58", "label": "String.prototype.replace()", "localization_tags": [], "url": "/zh-TW/docs/JavaScript/Reference/Global_Objects/String/replace", "last_edit": "2014-07-04T05:35:58", "summary": "replace(pattern, replacement)
\u65b9\u6cd5\u50b3\u56de\u4e00\u500b\u65b0\u5b57\u4e32\uff0c\u6b64\u65b0\u5b57\u4e32\u662f\u900f\u904e\u5c07\u539f\u5b57\u4e32\u8207 pattern
\u6bd4\u5c0d\uff0c\u7528 replacement
\u53d6\u4ee3\u543b\u5408\u8655\u800c\u751f\u6210\u3002 pattern
\u53ef\u4ee5\u662f\u5b57\u4e32\u6216\u6216 RegExp, replacement
\u53ef\u4ee5\u662f\u5b57\u4e32\u6216\u51fd\u5f0f\u3002", "sections": [{"id": "Quick_Links", "title": "Standard built-in objects String Inheritance: Function Object"}, {"id": "Summary", "title": "Summary"}, {"id": "Syntax", "title": "\u8a9e\u6cd5"}, {"id": "Returns", "title": "Returns"}, {"id": "Parameters", "title": "Parameters"}, {"id": "Description", "title": "Description"}, {"id": "Specifying_a_string_as_a_parameter", "title": "Specifying a string as a parameter"}, {"id": "Specifying_a_function_as_a_parameter", "title": "Specifying a function as a parameter"}, {"id": "Examples", "title": "Examples"}, {"id": "Example:_Using_global_and_ignore_with_replace", "title": "Example: Using global and ignore with replace"}, {"id": "Example:_Defining_the_regular_expression_in_replace", "title": "Example: Defining the regular expression in replace"}, {"id": "Example:_Switching_words_in_a_string", "title": "Example: Switching words in a string"}, {"id": "Example:_Using_an_inline_function_that_modifies_the_matched_characters", "title": "Example: Using an inline function that modifies the matched characters"}, {"id": "Example:_Replacing_a_Fahrenheit_degree_with_its_Celsius_equivalent", "title": "Example: Replacing a Fahrenheit degree with its Celsius equivalent"}, {"id": "Example: Use an inline function with a regular expression to avoid for loops", "title": "Example: Use an inline function with a regular expression to avoid for loops"}, {"id": "Specifications", "title": "Specifications"}, {"id": "Browser_compatibility", "title": "Browser compatibility"}, {"id": "See_also", "title": "See also"}], "id": 118051, "review_tags": []}