{"id":86,"date":"2012-06-14T22:49:59","date_gmt":"2012-06-14T13:49:59","guid":{"rendered":"http:\/\/appsweets.net\/blog\/?p=86"},"modified":"2012-06-16T02:31:33","modified_gmt":"2012-06-15T17:31:33","slug":"substitute","status":"publish","type":"post","link":"http:\/\/appsweets.net\/blog\/2012\/06\/14\/substitute\/","title":{"rendered":"substitute!"},"content":{"rendered":"<div class=\"856f7bdf6ce2541193600c6e03dd1a56\" data-index=\"1\" style=\"float: left; margin: 16px 16px 16px 0;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-5825700137064158\";\r\n\/* 250sq, appsweets-blog *\/\r\ngoogle_ad_slot = \"4837931762\";\r\ngoogle_ad_width = 250;\r\ngoogle_ad_height = 250;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>ex \u30b3\u30de\u30f3\u30c9\u306e\u83ef\u3001s \u30b3\u30de\u30f3\u30c9\u306e\u30c6\u30b9\u30c8\u3002<br \/>\n<code>[addresses] s[\/pattern\/replacement\/[options][count][flags]]<\/code><\/p>\n<p>\u6307\u5b9a\u3055\u308c\u305f\u7bc4\u56f2 addresses \u306e\u5404\u884c\u306b\u3064\u3044\u3066\u3001\u6b63\u898f\u8868\u73fe pattern \u306b\u30de\u30c3\u30c1\u3059\u308b\u7b87\u6240\u3092 replacement \u3067\u7f6e\u63db\u3059\u308b\u3002pattern \u3092\u56f2\u3080\u533a\u5207\u308a\u6587\u5b57\u306f \/ \u306e\u4ee3\u308f\u308a\u306b \\\u3001|\u3001\u6539\u884c\u3001&#8221; \u4ee5\u5916\u306e\u975e\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u6587\u5b57\u3092\u7528\u3044\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002\\ \u306f\u533a\u5207\u308a\u6587\u5b57\u3084 \\ \u305d\u306e\u3082\u306e\u306a\u3069\u306e\u7279\u6b8a\u306a\u6587\u5b57\u3092\u30a8\u30b9\u30b1\u30fc\u30d7\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<p>pattern\u3001\u304a\u3088\u3073 replacement \u306e\u76f4\u5f8c\u306e\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306e\u672b\u5c3e\u3068\u306a\u308b\u533a\u5207\u308a\u6587\u5b57\u306f\u3001\u7701\u7565\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002pattern \u3068 replacement \u304c\u4e21\u65b9\u7701\u7565\u3055\u308c\u305f\u5834\u5408\u3001\u6700\u5f8c\u306b\u5b9f\u884c\u3055\u308c\u305f s \u30b3\u30de\u30f3\u30c9\u304c\u7e70\u308a\u8fd4\u3055\u308c\u308b\u3002pattern \u304c\u6307\u5b9a\u3055\u308c\u306a\u3044\u304b\u7a7a\u306e\u5834\u5408\u3001vi \u5168\u4f53\u3067\u6700\u5f8c\u306b\u4f7f\u7528\u3055\u308c\u305f\u6b63\u898f\u8868\u73fe\u304c\u7528\u3044\u3089\u308c\u308b\u3002replacement \u304c\u6307\u5b9a\u3055\u308c\u306a\u3044\u304b\u7a7a\u306e\u5834\u5408\u3001pattern \u306b\u30de\u30c3\u30c1\u3059\u308b\u7b87\u6240\u306f\u7a7a\u6587\u5b57\u5217\u3067\u7f6e\u63db\u3055\u308c\u308b\u3002replacement \u5168\u4f53\u304c % \u3067\u3042\u308b\u5834\u5408\u3001\u6700\u5f8c\u306b s \u30b3\u30de\u30f3\u30c9\u3067\u4f7f\u7528\u3055\u308c\u305f\u7f6e\u63db\u30d1\u30bf\u30fc\u30f3\u304c\u7528\u3044\u3089\u308c\u308b\u3002<\/p>\n<p>replacement \u5185\u3067\u306e\u30ad\u30e3\u30ea\u30c3\u30b8\u30ea\u30bf\u30fc\u30f3\uff08ex \u30e2\u30fc\u30c9\u3067\u306f \\\u3001open\/vi \u30e2\u30fc\u30c9\u3067\u306f ^V \u306b\u3088\u308b\u30a8\u30b9\u30b1\u30fc\u30d7\u3067\u5165\u529b\uff09\u306f\u3001\u5165\u529b\u7b87\u6240\u3067\u884c\u3092\u5206\u5272\u3057\u3066\u30d0\u30c3\u30d5\u30a1\u5185\u306b\u6539\u884c\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\u30ad\u30e3\u30ea\u30c3\u30b8\u30ea\u30bf\u30fc\u30f3\u81ea\u4f53\u306f\u7121\u8996\u3055\u308c\u308b\u3002<\/p>\n<p>options \u304c\u6587\u5b57 g\uff08global \u3092\u610f\u5473\u3059\u308b\uff09\u3092\u542b\u3093\u3067\u3044\u308b\u5834\u5408\u3001\u884c\u5185\u306b\u304a\u3044\u3066 pattern \u306b\u30de\u30c3\u30c1\u3059\u308b\u7bc4\u56f2\u304c\u4e92\u3044\u306b\u91cd\u306a\u3089\u306a\u3044\u5f62\u5f0f\u3067\u3059\u3079\u3066\u7f6e\u63db\u3055\u308c\u308b\u3002<\/p>\n<p>options \u304c\u6587\u5b57 c\uff08confirm \u3092\u610f\u5473\u3059\u308b\uff09\u3092\u542b\u3093\u3067\u3044\u308b\u5834\u5408\u3001\u78ba\u8a8d\u30e2\u30fc\u30c9\u306b\u306a\u308b\u3002pattern \u306b\u30de\u30c3\u30c1\u3057\u305f\u7b87\u6240\u304c\u753b\u9762\u306b\u73fe\u308c\u308b\u3002vi \u306f\u30e6\u30fc\u30b6\u30fc\u304b\u3089\u306e\u53cd\u5fdc\u3092\u5f85\u3064\u3002\u80af\u5b9a\u7684\u306a\u5fdc\u7b54\uff08y \u306a\u3069\uff09\u304c\u5165\u529b\u3055\u308c\u308b\u3068\u7f6e\u63db\u304c\u884c\u308f\u308c\u308b\u3002\u4ed6\u306e\u5165\u529b\u3067\u306f\u884c\u308f\u308c\u306a\u3044\u3002<\/p>\n<p>\u691c\u7d22\u65b9\u5411\u304c\u672a\u4fdd\u5b58\u306e\u5834\u5408\u3001s \u30b3\u30de\u30f3\u30c9\u306f\u305d\u308c\u3092\u300c\u524d\u65b9\u300d\u306b\u30bb\u30c3\u30c8\u3059\u308b\u3002<\/p>\n<p>s \u30b3\u30de\u30f3\u30c9\u306e\u4e9c\u7a2e\u3068\u3057\u3066 &amp; \u30b3\u30de\u30f3\u30c9\u304c\u3042\u308b\u3002&amp; \u30b3\u30de\u30f3\u30c9\u306f<br \/>\n<code>s\/pattern\/replacement\/<\/code><br \/>\n\u3068\u3057\u3066\u7f6e\u304d\u63db\u3048\u3089\u308c\u308b\u3002\u3053\u306e\u3068\u304d pattern \u304a\u3088\u3073 replacement \u306f\u524d\u56de\u306e s\u3001&amp;\u3001~ \u30b3\u30de\u30f3\u30c9\u3067\u4f7f\u308f\u308c\u305f\u3082\u306e\u3092\u7528\u3044\u308b\u3002<\/p>\n<p>\u3082\u3046\u3072\u3068\u3064\u306e\u4e9c\u7a2e\u3068\u3057\u3066 ~ \u30b3\u30de\u30f3\u30c9\u304c\u3042\u308b\u3002~ \u30b3\u30de\u30f3\u30c9\u306f<br \/>\n<code>s\/pattern\/replacement\/<\/code><br \/>\n\u3068\u3057\u3066\u7f6e\u304d\u63db\u3048\u3089\u308c\u308b\u3002\u3053\u306e\u3068\u304d pattern \u306f vi \u5168\u4f53\u3067\u6700\u5f8c\u306b\u4f7f\u7528\u3055\u308c\u305f\u6b63\u898f\u8868\u73fe\u3001replacement \u306f\u524d\u56de\u306e\u7f6e\u63db\uff08&amp;\u3001~ \u3092\u542b\u3080\uff09\u3067\u4f7f\u308f\u308c\u305f\u3082\u306e\u3092\u7528\u3044\u308b\u3002<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u7d42\u4e86\u5f8c\u3001\u30ab\u30fc\u30bd\u30eb\u4f4d\u7f6e\u306f\u3001\u7f6e\u63db\u304c\u884c\u308f\u308c\u306a\u304b\u3063\u305f\u5834\u5408\u306f\u5909\u5316\u3057\u306a\u3044\u3002\u7f6e\u63db\u304c\u884c\u308f\u308c\u305f\u5834\u5408\u306f\u3001\u6700\u5f8c\u306b\u7f6e\u63db\u304c\u884c\u308f\u308c\u305f\u884c\u306e\u3001\u6700\u521d\u306e\u975e\u7a7a\u767d\u6587\u5b57\u306b\u7f6e\u304b\u308c\u308b\u3002<\/p>\n<p><strong>replacement \u306e\u66f8\u5f0f\u00a0<\/strong><\/p>\n<p>\u6587\u5b57 &#038;\uff08magic \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f \\&#038;\uff09\u306f\u3001pattern \u306b\u30de\u30c3\u30c1\u3057\u7f6e\u63db\u3055\u308c\u308b\u3079\u304d\u6587\u5b57\u5217\u3092\u793a\u3059\u3002\u6587\u5b57 ~\uff08magic \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f \\~\uff09\u306f\u524d\u56de\u306e s \u30b3\u30de\u30f3\u30c9\u3067\u4f7f\u7528\u3055\u308c\u305f replacement \u3092\u793a\u3059\u3002\\n\uff08n \u306f\u6574\u6570\uff09\u306f\u3001pattern \u3067\u6307\u5b9a\u3055\u308c\u308b\u5f8c\u65b9\u53c2\u7167\u5f0f\u306b\u5bfe\u5fdc\u3059\u308b\u3082\u306e\u3092\u793a\u3059\u3002n \u306f\u5f8c\u65b9\u53c2\u7167\u5f0f\u306e\u51fa\u73fe\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u793a\u3059\u3002\u5bfe\u5fdc\u3059\u308b\u5f8c\u65b9\u53c2\u7167\u5f0f\u304c\u306a\u3044\u5834\u5408\u3001\\n \u306f\u7a7a\u6587\u5b57\u3067\u7f6e\u304d\u63db\u3048\u3089\u308c\u308b\u3002<\/p>\n<p>\\l\u3001\\u\u3001\\L\u3001\\U \u306f\u7f6e\u63db\u6587\u5b57\u5217\u5185\u306e\u8981\u7d20\uff08\u30ea\u30c6\u30e9\u30eb\u3001&#038;\u3001\\n\uff09\u306e\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u64cd\u4f5c\u3059\u308b\u3002\\l \u3068 \\u \u306f\u5f8c\u7d9a\u3059\u308b 1 \u6587\u5b57\u306e\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u64cd\u4f5c\u3059\u308b\u3002\\L \u3068 \\U \u306f\u5f8c\u7d9a\u3059\u308b\u6587\u5b57\u5217\u3092 \\e \u307e\u305f\u306f \\E \u304c\u73fe\u308c\u308b\u304b\u3001\u7f6e\u63db\u6587\u5b57\u5217\u306e\u6700\u5f8c\u307e\u3067\u3001\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u64cd\u4f5c\u3059\u308b\u3002<\/p>\n<p>\u3053\u306e\u4ed6\u306e\u6587\u5b57\u306f\u305d\u306e\u6587\u5b57\u305d\u306e\u3082\u306e\u3068\u3057\u3066\u6271\u308f\u308c\u308b\u3002<\/p>\n<p>\u2026\u2026\u3060\u305d\u3046\u3067\u3059\u3002<\/p>\n<div class=\"856f7bdf6ce2541193600c6e03dd1a56\" data-index=\"1\" style=\"float: left; margin: 16px 16px 16px 0;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-5825700137064158\";\r\n\/* 250sq, appsweets-blog *\/\r\ngoogle_ad_slot = \"4837931762\";\r\ngoogle_ad_width = 250;\r\ngoogle_ad_height = 250;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>ex \u30b3\u30de\u30f3\u30c9\u306e\u83ef\u3001s \u30b3\u30de\u30f3\u30c9\u306e\u30c6\u30b9\u30c8\u3002 [addresses] s[\/pattern\/replacement\/[options][count][flags]] \u6307\u5b9a\u3055\u308c\u305f\u7bc4\u56f2 addresses \u306e\u5404\u884c\u306b\u3064\u3044\u3066\u3001\u6b63\u898f\u8868\u73fe pattern \u306b\u30de\u30c3\u30c1\u3059\u308b\u7b87\u6240\u3092 replacement \u3067\u7f6e\u63db\u3059\u308b\u3002pattern \u3092\u56f2\u3080\u533a\u5207\u308a\u6587\u5b57\u306f \/ \u306e\u4ee3\u308f\u308a\u306b \\\u3001|\u3001\u6539\u884c\u3001&#8221; \u4ee5\u5916\u306e\u975e\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u6587\u5b57\u3092\u7528\u3044\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002\\ \u306f\u533a\u5207\u308a\u6587\u5b57\u3084 \\ \u305d\u306e\u3082\u306e\u306a\u3069\u306e\u7279\u6b8a\u306a\u6587\u5b57\u3092\u30a8\u30b9\u30b1\u30fc\u30d7\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002 pattern\u3001\u304a\u3088\u3073 replacement \u306e\u76f4\u5f8c\u306e\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306e\u672b\u5c3e\u3068\u306a\u308b\u533a\u5207\u308a\u6587\u5b57\u306f\u3001\u7701\u7565\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002pattern \u3068 replacement \u304c\u4e21\u65b9\u7701\u7565\u3055\u308c\u305f\u5834\u5408\u3001\u6700\u5f8c\u306b\u5b9f\u884c\u3055\u308c\u305f s \u30b3\u30de\u30f3\u30c9\u304c\u7e70\u308a\u8fd4\u3055\u308c\u308b\u3002pattern \u304c\u6307\u5b9a\u3055\u308c\u306a\u3044\u304b\u7a7a\u306e\u5834\u5408\u3001vi \u5168\u4f53\u3067\u6700\u5f8c\u306b\u4f7f\u7528\u3055\u308c\u305f\u6b63\u898f\u8868\u73fe\u304c\u7528\u3044\u3089\u308c\u308b\u3002replacement \u304c\u6307\u5b9a\u3055\u308c\u306a\u3044\u304b\u7a7a\u306e\u5834\u5408\u3001pattern \u306b\u30de\u30c3\u30c1\u3059\u308b\u7b87\u6240\u306f\u7a7a\u6587\u5b57\u5217\u3067\u7f6e\u63db\u3055\u308c\u308b\u3002replacement \u5168\u4f53\u304c % \u3067\u3042\u308b\u5834\u5408\u3001\u6700\u5f8c\u306b s \u30b3\u30de\u30f3\u30c9\u3067\u4f7f\u7528\u3055\u308c\u305f\u7f6e\u63db\u30d1\u30bf\u30fc\u30f3\u304c\u7528\u3044\u3089\u308c\u308b\u3002 replacement \u5185\u3067\u306e\u30ad\u30e3\u30ea\u30c3\u30b8\u30ea\u30bf\u30fc\u30f3\uff08ex \u30e2\u30fc\u30c9\u3067\u306f &hellip; <a href=\"http:\/\/appsweets.net\/blog\/2012\/06\/14\/substitute\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[5,3,4],"class_list":["post-86","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-javascript","tag-vi","tag-wasavi"],"_links":{"self":[{"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/86","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/comments?post=86"}],"version-history":[{"count":6,"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/86\/revisions"}],"predecessor-version":[{"id":93,"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/posts\/86\/revisions\/93"}],"wp:attachment":[{"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/media?parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/categories?post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appsweets.net\/blog\/wp-json\/wp\/v2\/tags?post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}