{"id":594,"date":"2020-03-11T10:15:10","date_gmt":"2020-03-11T01:15:10","guid":{"rendered":"https:\/\/auto-worker.com\/blog\/?p=594"},"modified":"2020-03-11T10:15:10","modified_gmt":"2020-03-11T01:15:10","slug":"post-594","status":"publish","type":"post","link":"https:\/\/auto-worker.com\/blog\/?p=594","title":{"rendered":"Google Apps Script(GAS)\u3067\u6587\u5b57\u5217\u3092\u5207\u308a\u51fa\u3057\u30fb\u62bd\u51fa(slice,substring,substr)\u306e\u89e3\u8aac"},"content":{"rendered":"<p>Google Apps Script(GAS)\u3067\u6587\u5b57\u5217\u306e\u4e2d\u304b\u3089\u4e00\u90e8\u3092\u5207\u308a\u51fa\u3057\u3066\u62bd\u51fa\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u3001slice\u3001substring\u3001substr\u306e3\u7a2e\u985e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>slice\u3001substring\u3001substr\u306e\u5404\u69cb\u6587\u3068\u4f7f\u3044\u65b9\u3001\u305d\u308c\u305e\u308c\u306e\u9055\u3044\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>GAS\u306e\u6587\u5b57\u5217\u5207\u308a\u51fa\u3057\u30fb\u62bd\u51fa\u306b\u306f3\u7a2e\u985e\u306e\u30e1\u30bd\u30c3\u30c9<\/h2>\n<p>Google Apps Script(GAS)\u3067\u306f\u6587\u5b57\u5217\u306e\u5207\u308a\u51fa\u3057\u3084\u62bd\u51fa\u306f\u983b\u7e41\u306b\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>\u7279\u306b\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3084\u30b5\u30a4\u30c8\u306e\u30af\u30ed\u30fc\u30ea\u30f3\u30b0\u306a\u3069\u3092\u884c\u3063\u3066\u3044\u308b\u3068\u3001URL\u64cd\u4f5c\u3084\u8981\u7d20\u62bd\u51fa\u306e\u969b\u306b\u306f\u3001\u6587\u5b57\u5217\u306e\u5207\u308a\u51fa\u3057\u304c\u4e0d\u53ef\u6b20\u3067\u3059\u3002<\/p>\n<p>GAS\u3067\u306f\u6587\u5b57\u5217\u306e\u5207\u308a\u51fa\u3057\u30fb\u62bd\u51fa\u3092\u884c\u3046\u30e1\u30bd\u30c3\u30c9(\u30b3\u30de\u30f3\u30c9)\u3068\u3057\u3066\u3001\u4ee5\u4e0b\u306e3\u7a2e\u985e\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li>slice<\/li>\n<li>substring<\/li>\n<li>substr<\/li>\n<\/ol>\n<h2>slice,substring,substr\u306e\u69cb\u6587<\/h2>\n<p>3\u3064\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u69cb\u6587\u306b\u52a0\u3048\u3001\u4f8b\u6587\u3068\u3057\u3066\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p><code>slice(start [,end])<\/code><\/p>\n<p>\u203bend\u306e\u5f15\u6570\u306f\u7701\u7565\u53ef\u80fd\u3002\u7701\u7565\u3067\u6700\u5f8c\u306e\u6587\u5b57\u307e\u3067<\/p>\n<p><strong>\u2192\u6587\u5b57\u5217\u304b\u3089start\u6587\u5b57\u76ee\u304b\u3089end-1\u6587\u5b57\u76ee\u307e\u3067\u53d6\u5f97<\/strong><\/p>\n<p><code>substring(start [,end])<\/code><\/p>\n<p>\u203bend\u306e\u5f15\u6570\u306f\u7701\u7565\u53ef\u80fd\u3002\u7701\u7565\u3067\u6700\u5f8c\u306e\u6587\u5b57\u307e\u3067<\/p>\n<p><strong>\u2192\u6587\u5b57\u5217\u304b\u3089start\u6587\u5b57\u76ee\u304b\u3089end-1\u6587\u5b57\u76ee\u307e\u3067\u53d6\u5f97<\/strong><\/p>\n<p><code>substr(start [,len])<\/code><\/p>\n<p>\u203blen\u306e\u5f15\u6570\u306f\u7701\u7565\u3082\u53ef\u80fd\u3002\u7701\u7565\u3067\u6700\u5f8c\u307e\u3067<\/p>\n<p><strong>\u2192\u6587\u5b57\u5217\u304b\u3089start\u6587\u5b57\u76ee\u304b\u3089len\u6587\u5b57\u3092\u53d6\u5f97<\/strong><\/p>\n<p>\u305d\u308c\u305e\u308c\u306e\u69cb\u6587\u3092\u898b\u6bd4\u3079\u308b\u3068\u3001slice\u3068substring\u306f\u5207\u308a\u51fa\u3059\u958b\u59cb\u4f4d\u7f6e\u3068\u7d42\u4e86\u4f4d\u7f6e\u3092\u6307\u5b9a\u3059\u308b\u306e\u306b\u5bfe\u3057\u3001substr\u306f\u5207\u308a\u51fa\u3059\u6587\u5b57\u306e\u958b\u59cb\u4f4d\u7f6e\u3068\u3001\u5207\u308a\u51fa\u3059\u6587\u5b57\u6570\u3092\u6307\u5b9a\u3059\u308b\u5f62\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>slice\u3068substring\u306f\u69cb\u6587\u4e0a\u306f\u540c\u7b49\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u3088\u3046\u306b\u7406\u89e3\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001\u5b9f\u306fslice\u3068substring\u3082\u5fae\u5999\u306b\u6319\u52d5\u304c\u7570\u306a\u308b\u70b9\u304c\u3042\u308a\u3001\u305d\u306e\u70b9\u306b\u3064\u3044\u3066\u5f8c\u8ff0\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h2>slice,substring,substr\u306e\u4f8b\u6587(\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9)<\/h2>\n<p>\u5404\u30e1\u30bd\u30c3\u30c9\u306b\u3064\u3044\u3066\u69cb\u6587\u3060\u3051\u3060\u3068\u5206\u304b\u308a\u306b\u304f\u3044\u305f\u3081\u3001\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u7528\u610f\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u300c\u79c1\u306f\u65e5\u672c\u4eba\u3067\u3059\u300d\u3068\u3044\u3046\u6587\u5b57\u5217\u304b\u3089\u3001\u300c\u65e5\u672c\u4eba\u300d\u3068\u3044\u3046\u5358\u8a9e\u3092\u62bd\u51fa\u3059\u308b\u3082\u306e\u3067\u3059\u3002<\/p>\n<p><code>function extractString() {<br \/>\nlet stringText = \"\u79c1\u306f\u65e5\u672c\u4eba\u3067\u3059\";<br \/>\n\/\/slice\u3067\u300c\u65e5\u672c\u4eba\u300d\u3092\u62bd\u51fa\u3059\u308b<br \/>\nLogger.log(stringText.slice(2,5));<br \/>\n\/\/substring\u306e\u3067\u300c\u65e5\u672c\u4eba\u300d\u3092\u62bd\u51fa\u3059\u308b<br \/>\nLogger.log(stringText.substring(2,5));<br \/>\n\/\/substr\u306e\u3067\u300c\u65e5\u672c\u4eba\u300d\u3092\u62bd\u51fa\u3059\u308b<br \/>\nLogger.log(stringText.substr(2,3));<br \/>\n}<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-599\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200311_auto_001.jpg\" alt=\"Google Apps Script(GAS)\u3067\u6587\u5b57\u5217\u3092\u5207\u308a\u51fa\u3057\u30fb\u62bd\u51fa\u3059\u308b\u30e1\u30bd\u30c3\u30c9slice,substring,substr\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\" width=\"800\" height=\"467\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200311_auto_001.jpg 800w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200311_auto_001-300x175.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200311_auto_001-768x448.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200311_auto_001-530x309.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200311_auto_001-565x330.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200311_auto_001-710x414.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200311_auto_001-725x423.jpg 725w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>\u5b9f\u884c\u7d50\u679c\u3067\u3001GAS\u306e\u30ed\u30b0\u3092\u78ba\u8a8d\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u3079\u3066\u65e5\u672c\u4eba\u3068\u8a18\u9332\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<blockquote><p>[20-03-09 09:04:15:605 JST] \u65e5\u672c\u4eba<br \/>\n[20-03-09 09:04:15:607 JST] \u65e5\u672c\u4eba<br \/>\n[20-03-09 09:04:15:609 JST] \u65e5\u672c\u4eba<\/p><\/blockquote>\n<p>2\u756a\u76ee\u306e\u5f15\u6570\u3092\u7701\u7565\u3059\u308b\u3068\u3001\u305d\u308c\u305e\u308c1\u756a\u76ee\u306e\u5f15\u6570\u306e\u6587\u5b57\u756a\u53f7\u304b\u3089\u3001\u6587\u5b57\u5217\u306e\u6700\u5f8c\u307e\u3067\u5207\u308a\u53d6\u3063\u3066\u62bd\u51fa\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><code>function extractString2() {<br \/>\nlet stringText = \"\u79c1\u306f\u65e5\u672c\u4eba\u3067\u3059\";<br \/>\n\/\/slice\u3067\u300c\u65e5\u672c\u4eba\u3067\u3059\u300d\u3092\u62bd\u51fa\u3059\u308b<br \/>\nLogger.log(stringText.slice(2));<br \/>\n\/\/substring\u306e\u3067\u300c\u65e5\u672c\u4eba\u3067\u3059\u300d\u3092\u62bd\u51fa\u3059\u308b<br \/>\nLogger.log(stringText.substring(2));<br \/>\n\/\/substr\u306e\u3067\u300c\u65e5\u672c\u4eba\u3067\u3059\u300d\u3092\u62bd\u51fa\u3059\u308b<br \/>\nLogger.log(stringText.substr(2));<br \/>\n}<\/code><\/p>\n<blockquote><p>[20-03-09 09:10:47:861 JST] \u65e5\u672c\u4eba\u3067\u3059<br \/>\n[20-03-09 09:10:47:863 JST] \u65e5\u672c\u4eba\u3067\u3059<br \/>\n[20-03-09 09:10:47:866 JST] \u65e5\u672c\u4eba\u3067\u3059<\/p><\/blockquote>\n<h2>slice\u3068substring\u306e\u6319\u52d5\u306e\u9055\u3044\u3092\u89e3\u8aac<\/h2>\n<p>slice\u3068substring\u306e\u6587\u5b57\u5217\u3092\u5207\u308a\u51fa\u3057\u3066\u62bd\u51fa\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u306f\u5f15\u6570\u306e\u6307\u5b9a\u65b9\u6cd5\u3082\u540c\u3058\u3067\u3001\u307e\u3063\u305f\u304f\u540c\u7b49\u306e\u6a5f\u80fd\u306e\u3088\u3046\u306b\u898b\u3048\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001slice(start,end)\u3068substring(start,end)\u306f\u5b8c\u5168\u306b\u306f\u540c\u3058\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u5f15\u6570\u306b\u6307\u5b9a\u3059\u308b\u5185\u5bb9\u306b\u3088\u3063\u3066\u306f\u3001\u6319\u52d5\u306b\u9055\u3044\u304c\u51fa\u308b\u30b1\u30fc\u30b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u3046\u3057\u305fslice\u3068substring\u306e\u7d50\u679c\u306b\u9055\u3044\u304c\u751f\u3058\u308b2\u3064\u306e\u30d1\u30bf\u30fc\u30f3\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h3>\u5f15\u6570start,end\u306b\u8ca0\u306e\u6570\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u5834\u5408<\/h3>\n<p>slice\u3068substring\u306f\u5f15\u6570\u306b\u8ca0\u306e\u6570\u3001-4\u306e\u3088\u3046\u306a\u30de\u30a4\u30ca\u30b9\u306e\u6570\u5b57\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u5834\u5408\u306b\u6319\u52d5\u304c\u5909\u5316\u3057\u307e\u3059\u3002<\/p>\n<h4>substring\u306f\u8ca0\u306e\u6570\u306e\u5f15\u6570\u30920\u3068\u3059\u308b<\/h4>\n<p>substring\u306f\u8ca0\u306e\u6570\u304c\u5f15\u6570\u306b\u6307\u5b9a\u3055\u308c\u3066\u3044\u305f\u5834\u5408\u3001<strong>\uff10<\/strong>\u3068\u3057\u3066\u3068\u3089\u3048\u307e\u3059\u3002<\/p>\n<p><code>stringText.substring(-3,5);<\/code><\/p>\n<p>\u3068\u8a18\u8ff0\u3057\u305f\u5834\u5408\u306b\u306f\u3001-3\u306f0\u3068\u898b\u306a\u3055\u308c\u3001\u6700\u521d\u306e\u6587\u5b57\u304b\u3089(5-1)4\u6587\u5b57\u76ee\u307e\u3067\u304c\u62bd\u51fa\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><code>stringText.substring(-1,-5);<\/code><\/p>\n<p>\u7b2c\u4e00\u5f15\u6570\u3001\u7b2c\u4e8c\u5f15\u6570\u3068\u3082\u306b\u8ca0\u306e\u6570\u306e\u5834\u5408\u306f\u3001\u3069\u3061\u3089\u30820\u3068\u307f\u306a\u3055\u308c\u3001\u4f55\u3082\u62bd\u51fa\u3055\u308c\u306a\u3044\u7a7a\u306e\u5fdc\u7b54\u304c\u8fd4\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n<h4>slice\u306f\u8ca0\u306e\u5f15\u6570\u3092\u672b\u5c3e\u304b\u3089\u306e\u6587\u5b57\u6570\u3068\u3059\u308b<\/h4>\n<p>slice\u306f\u8ca0\u306e\u6570\u304c\u5f15\u6570\u306b\u6307\u5b9a\u3055\u308c\u3066\u3044\u305f\u5834\u5408\u3001\u6587\u5b57\u5217\u306e\u672b\u5c3e\u304b\u3089\u306e\u6587\u5b57\u6570\u3068\u3057\u3066\u3068\u3089\u3048\u307e\u3059\u3002<\/p>\n<p>-2\u306e\u5834\u5408\u306f\u3001\u300c\u672b\u5c3e\u304b\u30892\u6587\u5b57\u76ee\u300d\u3068\u3057\u3066\u51e6\u7406\u304c\u884c\u308f\u308c\u307e\u3059\u3002<\/p>\n<p><code>let stringText =\"\u79c1\u306f\u65e5\u672c\u4eba\u3067\u3059\";<br \/>\nstringText.slice(2,-2);<\/code><\/p>\n<p>\u3053\u306e\u5834\u5408\u3001stringText.slice(2,5)\u3068\u540c\u3058\u65e5\u672c\u4eba\u304c\u62bd\u51fa\u3055\u308c\u307e\u3059\u3002<\/p>\n<h3>\u7b2c\u4e00\u5f15\u6570start\u3088\u308a\u3082\u7b2c\u4e8c\u5f15\u6570end\u304c\u5c0f\u3055\u3044\u5834\u5408(start&gt;end)<\/h3>\n<p>slice,substing\u306fstart\u6587\u5b57\u76ee\u304b\u3089(end-1)\u6587\u5b57\u76ee\u307e\u3067\u3092\u5207\u308a\u51fa\u3059\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001end\u3088\u308a\u3082start\u306e\u6570\u5024\u304c\u5927\u304d\u3044\u5024\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u306b\u3001\u305d\u308c\u305e\u308c\u3067\u6319\u52d5\u304c\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<h4>substring\u306f\u5f15\u6570\u3092\u5165\u308c\u66ff\u3048\u308b\u51e6\u7406\u304c\u81ea\u52d5\u5b9f\u884c<\/h4>\n<p>substring\u306e\u5834\u5408\u3001\u7b2c\u4e00\u5f15\u6570\u304c\u7b2c\u4e8c\u5f15\u6570\u3088\u308a\u3082\u5927\u304d\u3044\u5834\u5408\u3001\u5f15\u6570\u3092\u5165\u308c\u66ff\u3048\u308b\u51e6\u7406\u304c\u81ea\u52d5\u7684\u306b\u884c\u308f\u308c\u307e\u3059\u3002<\/p>\n<p><code>let stringText =\"\u79c1\u306f\u65e5\u672c\u4eba\u3067\u3059\";<br \/>\nstringText.substring(5,2);<\/code><\/p>\n<p>\u3053\u306e\u5834\u5408\u3001substring(2,5)\u3068\u5165\u308c\u66ff\u3048\u3066\u51e6\u7406\u304c\u884c\u308f\u308c\u3001\u300c\u65e5\u672c\u4eba\u300d\u3068\u3044\u3046\u6587\u5b57\u5217\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<h4>slice\u306f\u5f15\u6570\u5165\u308c\u66ff\u3048\u305b\u305a\u3001\u7a7a\u6587\u5b57\u5217\u3092\u51fa\u529b<\/h4>\n<p>slice\u306e\u5834\u5408\u306f\u3001\u7b2c\u4e00\u5f15\u6570\u3068\u7b2c\u4e8c\u5f15\u6570\u3092\u5165\u308c\u66ff\u3048\u308b\u51e6\u7406\u306f\u884c\u3044\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u306e\u7d50\u679c\u3001start&gt;end\u3067\u306f\u5207\u308a\u53d6\u3063\u3066\u62bd\u51fa\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u6587\u5b57\u5217\u304c\u5b58\u5728\u3057\u306a\u3044\u305f\u3081\u3001\u7a7a\u306e\u6587\u5b57\u5217\u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><code>let stringText =\"\u79c1\u306f\u65e5\u672c\u4eba\u3067\u3059\";<br \/>\nstringText.slice(5,2);<\/code><\/p>\n<p>\u4e0a\u8a18\u306e\u5834\u5408\u306f\u3001\u5b9f\u884c\u7d50\u679c\u3067\u306f\u4f55\u3082\u5207\u308a\u51fa\u3055\u308c\u307e\u305b\u3093\u3002<\/p>\n<h2>\u305d\u308c\u305e\u308c\u306e\u4f7f\u3044\u5206\u3051\u30d1\u30bf\u30fc\u30f3<\/h2>\n<p>\u5207\u308a\u51fa\u3057\u305f\u3044\u6587\u5b57\u5217\u30fb\u30ef\u30fc\u30c9\u306e\u30b5\u30a4\u30ba\u304c\u660e\u78ba\u306b\u5206\u304b\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u3001substr\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u306e\u304c\u30aa\u30b9\u30b9\u30e1\u3067\u3059\u3002<\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306e\u5834\u5408\u3001\u65e5\u672c\u4eba\u306f3\u6587\u5b57\u306a\u306e\u3067\u3001slice\u3084substring\u3088\u308a\u3082\u76f4\u611f\u7684\u306b\u6307\u5b9a\u3057\u3084\u3059\u3044\u3067\u3059\u3002<\/p>\n<p>slice\u3068substring\u3092\u3069\u3061\u3089\u3092\u4f7f\u3046\u304b\u3068\u3044\u3046\u70b9\u3067\u3059\u304c\u3001\u7d71\u4e00\u3057\u3066\u4f7f\u3046\u5834\u5408\u306f\u8ca0\u306e\u6570\u3092\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u308bslice\u306b\u3059\u308b\u3053\u3068\u3092\u30aa\u30b9\u30b9\u30e1\u3057\u307e\u3059\u3002<\/p>\n<p>\u5207\u308a\u51fa\u3057\u30fb\u62bd\u51fa\u306e\u6761\u4ef6\u306e\u4e2d\u3067\u306f\u6587\u5b57\u5217\u306e\u5f8c\u308d\u304b\u3089\u5207\u308a\u51fa\u3057\u305f\u3044\u3068\u3044\u3063\u305f\u30cb\u30fc\u30ba\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001URL\u306a\u3069\u306e\u5834\u5408\u306b\u524d\u534a\u90e8\u5206\u306bID\u60c5\u5831\u304c\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u9577\u3055\u304c\u53ef\u5909\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u30d1\u30bf\u30fc\u30f3\u3067\u3059\u3002<\/p>\n<p>slice\u306e\u5834\u5408\u306b\u306f\u6587\u5b57\u5217\u3092\u5f8c\u308d\u304b\u3089\u8a8d\u8b58\u3057\u3066\u3001\u5207\u308a\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u308bslice\u30e1\u30bd\u30c3\u30c9\u304c\u6709\u52b9\u3067\u3059\u3002<\/p>\n<p>\u305d\u3046\u3057\u305f\u5834\u5408\u306b\u306fsubstring\u306f\u30de\u30a4\u30ca\u30b9\u306e\u6570\u5b57\u306f\u30bc\u30ed\u3068\u3057\u3066\u51e6\u7406\u3055\u308c\u5bfe\u5fdc\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<ul>\n<li>\u5207\u308a\u51fa\u3059\u6587\u5b57\u5217\u304c\u6c7a\u307e\u3063\u3066\u3044\u308b\uff1asubstr<\/li>\n<li>\u6587\u5b57\u5217\u306e\u5f8c\u308d\u304b\u3089\u5207\u308a\u51fa\u3057\u305f\u3044\uff1aslice<\/li>\n<\/ul>\n<p>\u3068\u3044\u3063\u305f\u4f7f\u3044\u5206\u3051\u3059\u308b\u306e\u304c\u6a5f\u80fd\u7684\u306a\u9762\u3067\u63a8\u5968\u3067\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081\u30fb\u7d42\u308f\u308a\u306b<\/h2>\n<p>\u4eca\u56de\u3001Google Apps Script(GAS)\u3067\u3001\u6587\u5b57\u5217\u3092\u5207\u308a\u51fa\u3057\u3066\u62bd\u51fa\u3057\u305f\u3044\u5834\u5408\u306b\u5229\u7528\u3067\u304d\u308b3\u3064\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>slice,substring,substr\u306f\u3044\u305a\u308c\u3082String\u578b\u306e\u6587\u5b57\u5217\u304b\u3089\u4e00\u90e8\u3092\u5207\u308a\u51fa\u3059\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u304c\u3001\u5f15\u6570\u306e\u6307\u5b9a\u5185\u5bb9\u3084\u5fae\u5999\u306b\u6319\u52d5\u304c\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u6587\u5b57\u5217\u3092\u5207\u308a\u51fa\u3057\u305f\u3044\u30d1\u30bf\u30fc\u30f3\u306b\u5fdc\u3058\u3066\u3001\u9078\u629e\u3059\u3079\u304d\u30e1\u30bd\u30c3\u30c9\u304c\u6c7a\u307e\u308a\u307e\u3059\u3002<\/p>\n<p>\u6587\u5b57\u5217\u62bd\u51fa\u306e\u969b\u306f\u3001slice,substring,substr\u306e\u7279\u6027\u3092\u8003\u616e\u3057\u3001\u3069\u308c\u3092\u4f7f\u3046\u304b\u9078\u3073\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Apps Script(GAS)\u3067\u6587\u5b57\u5217\u306e\u4e2d\u304b\u3089\u4e00\u90e8\u3092\u5207\u308a\u51fa\u3057\u3066\u62bd\u51fa\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u3001slice\u3001substring\u3001substr\u306e3\u7a2e\u985e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 slice\u3001substring\u3001substr\u306e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":600,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[14,182,184,183,180,181,179],"class_list":["post-594","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gas","tag-gas","tag-slice","tag-substr","tag-substring","tag-180","tag-181","tag-179"],"_links":{"self":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=594"}],"version-history":[{"count":5,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/594\/revisions"}],"predecessor-version":[{"id":601,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/594\/revisions\/601"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/600"}],"wp:attachment":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=594"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}