{"id":144,"date":"2024-09-11T17:57:28","date_gmt":"2024-09-11T08:57:28","guid":{"rendered":"https:\/\/dexall.co.jp\/articles\/?p=144"},"modified":"2025-03-24T08:55:00","modified_gmt":"2025-03-23T23:55:00","slug":"%e3%80%90%e4%bf%9d%e5%ad%98%e7%89%88%e3%80%91ruby%e3%81%aesplit%e3%83%a1%e3%82%bd%e3%83%83%e3%83%89%e5%ae%8c%e5%85%a8%e6%94%bb%e7%95%a5%ef%bc%9a%e5%88%9d%e5%bf%83%e8%80%85%e3%81%8b%e3%82%89%e4%b8%8a","status":"publish","type":"post","link":"https:\/\/dexall.co.jp\/articles\/?p=144","title":{"rendered":"\u3010\u4fdd\u5b58\u7248\u3011Ruby\u306esplit\u30e1\u30bd\u30c3\u30c9\u5b8c\u5168\u653b\u7565\uff1a\u521d\u5fc3\u8005\u304b\u3089\u4e0a\u7d1a\u8005\u307e\u3067\u4f7f\u3048\u308b7\u3064\u306e\u6280"},"content":{"rendered":"\n<p>Ruby\u306e<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u6587\u5b57\u5217\u64cd\u4f5c\u306e\u8981\u3068\u306a\u308b\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002<br>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u521d\u5fc3\u8005\u304b\u3089\u4e0a\u7d1a\u8005\u307e\u3067\u3001\u3042\u3089\u3086\u308bRuby\u958b\u767a\u8005\u304c<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u5b8c\u5168\u306b\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306e\u77e5\u8b58\u3068\u30c6\u30af\u30cb\u30c3\u30af\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<br>\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u304b\u3089\u9ad8\u5ea6\u306a\u5fdc\u7528\u3001\u305d\u3057\u3066\u5b9f\u969b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306e\u6d3b\u7528\u4f8b\u307e\u3067\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306e\u5168\u3066\u3092\u7db2\u7f85\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-sgb-block-simple sgb-box-simple sgb-box-simple--title-normal sgb-box-simple--with-border\"><div style=\"background-color:var(--wp--preset--color--sango-main);color:#FFF\" class=\"sgb-box-simple__title\">\u3053\u306e\u8a18\u4e8b\u3092\u901a\u3057\u3066\u7406\u89e3\u3067\u304d\u308b7\u3064\u306e\u3053\u3068<\/div><div class=\"sgb-box-simple__body\" style=\"border-color:var(--wp--preset--color--sango-main);background-color:#FFF\">\n<ul class=\"wp-block-list\">\n<li><code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u3068\u52d5\u4f5c\u539f\u7406<\/li>\n\n\n\n<li>7\u3064\u306e\u5b9f\u8df5\u7684\u306a<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306e\u30c6\u30af\u30cb\u30c3\u30af<\/li>\n\n\n\n<li><code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6700\u9069\u5316\u65b9\u6cd5<\/li>\n\n\n\n<li><code>split<\/code>\u3068\u4ed6\u306e\u6587\u5b57\u5217\u64cd\u4f5c\u30e1\u30bd\u30c3\u30c9\u306e\u9055\u3044\u3068\u4f7f\u3044\u5206\u3051<\/li>\n\n\n\n<li>\u5b9f\u969b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u304a\u3051\u308b<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306e\u6d3b\u7528\u4f8b<\/li>\n\n\n\n<li><code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u4f7f\u7528\u6642\u306e\u6ce8\u610f\u70b9\u3068\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/li>\n\n\n\n<li>\u3088\u308a\u52b9\u7387\u7684\u306a\u6587\u5b57\u5217\u64cd\u4f5c\u306e\u305f\u3081\u306e\u30b9\u30ad\u30eb\u30a2\u30c3\u30d7\u65b9\u6cd5<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<div class=\"toc\"><br \/>\n<b>Warning<\/b>:  Undefined array key \"is_admin\" in <b>\/home\/xs392991\/dexall.co.jp\/public_html\/articles\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>116<\/b><br \/>\n<br \/>\n<b>Warning<\/b>:  Undefined array key \"is_category_top\" in <b>\/home\/xs392991\/dexall.co.jp\/public_html\/articles\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>121<\/b><br \/>\n<br \/>\n<b>Warning<\/b>:  Undefined array key \"is_top\" in <b>\/home\/xs392991\/dexall.co.jp\/public_html\/articles\/wp-content\/themes\/sango-theme\/library\/gutenberg\/dist\/classes\/Toc.php<\/b> on line <b>128<\/b><br \/>\n    <div id=\"toc_container\" class=\"sgb-toc--bullets js-smooth-scroll\" data-dialog-title=\"\u76ee\u6b21\">\n      <p class=\"toc_title\">\u76ee\u6b21 <\/p>\n      <ul class=\"toc_list\">  <li class=\"first last\">    <a href=\"#i-0\">\u3010\u4fdd\u5b58\u7248\u3011Ruby\u306esplit\u30e1\u30bd\u30c3\u30c9\u5b8c\u5168\u653b\u7565\uff1a\u521d\u5fc3\u8005\u304b\u3089\u4e0a\u7d1a\u8005\u307e\u3067\u4f7f\u3048\u308b7\u3064\u306e\u6280<\/a>    <ul class=\"menu_level_1\">      <li class=\"first\">        <a href=\"#i-1\">1. Ruby\u306esplit\u30e1\u30bd\u30c3\u30c9\uff1a\u57fa\u672c\u304b\u3089\u5fdc\u7528\u307e\u3067<\/a>      <\/li>      <li>        <a href=\"#i-7\">2. split\u30e1\u30bd\u30c3\u30c9\u306e7\u3064\u306e\u5b9f\u8df5\u7684\u30c6\u30af\u30cb\u30c3\u30af<\/a>      <\/li>      <li>        <a href=\"#i-15\">3. split\u30e1\u30bd\u30c3\u30c9\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6700\u9069\u5316<\/a>      <\/li>      <li>        <a href=\"#i-26\">4. split\u30e1\u30bd\u30c3\u30c9\u3068\u4ed6\u306e\u6587\u5b57\u5217\u64cd\u4f5c\u30e1\u30bd\u30c3\u30c9\u306e\u6bd4\u8f03<\/a>      <\/li>      <li>        <a href=\"#i-34\">5. \u5b9f\u969b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306esplit\u30e1\u30bd\u30c3\u30c9\u6d3b\u7528\u4f8b<\/a>      <\/li>      <li>        <a href=\"#i-39\">6. split\u30e1\u30bd\u30c3\u30c9\u306e\u6ce8\u610f\u70b9\u3068\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/a>      <\/li>      <li class=\"last\">        <a href=\"#i-54\">7. \u307e\u3068\u3081\uff1aRuby\u306esplit\u30e1\u30bd\u30c3\u30c9\u30de\u30b9\u30bf\u30fc\u3078\u306e\u9053<\/a>      <\/li>    <\/ul>  <\/li><\/ul>\n      <a href=\"#\" class=\"sgb-toc-button js-toc-button\" rel=\"nofollow\" data-open-dialog=\"true\"><i class=\"fa fa-list\"><\/i><span class=\"sgb-toc-button__text\">\u76ee\u6b21\u3078<\/span><\/a>\n    <\/div><\/div><h2 class=\"wp-block-sgb-headings sgb-heading\" id=\"i-0\"><span class=\"sgb-heading__inner sgb-heading--type1 with-icon\" style=\"background-color:transparent;border-color:transparent;font-size:1.2em\"><i class=\"fa fa-check\" style=\"color:var(--wp--preset--color--sango-main)\"><\/i><span class=\"sgb-heading__text\" style=\"color:#333\">\u3010\u4fdd\u5b58\u7248\u3011Ruby\u306esplit\u30e1\u30bd\u30c3\u30c9\u5b8c\u5168\u653b\u7565\uff1a\u521d\u5fc3\u8005\u304b\u3089\u4e0a\u7d1a\u8005\u307e\u3067\u4f7f\u3048\u308b7\u3064\u306e\u6280<\/span><\/span><\/h2>\n\n\n\n<p>Ruby\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u306e\u7686\u3055\u3093\u3001\u3053\u3093\u306b\u3061\u306f\uff01\u6587\u5b57\u5217\u64cd\u4f5c\u306f\u65e5\u3005\u306e\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3067\u907f\u3051\u3066\u901a\u308c\u306a\u3044\u91cd\u8981\u306a\u30b9\u30ad\u30eb\u3067\u3059\u3088\u306d\u3002<br>\u305d\u306e\u4e2d\u3067\u3082\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306f\u6587\u5b57\u5217\u3092\u6271\u3046\u4e0a\u3067\u6b20\u304b\u305b\u306a\u3044\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3057\u304b\u3057\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306e\u771f\u306e\u529b\u3092\u77e5\u3063\u3066\u3044\u307e\u3059\u304b\uff1f\u5358\u7d14\u306a\u6587\u5b57\u5217\u306e\u5206\u5272\u3060\u3051\u3067\u306a\u304f\u3001\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u3063\u305f\u9ad8\u5ea6\u306a\u51e6\u7406\u3084\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u8003\u616e\u3057\u305f\u4f7f\u3044\u65b9\u306a\u3069\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306b\u306f\u591a\u304f\u306e\u53ef\u80fd\u6027\u304c\u79d8\u3081\u3089\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001Ruby\u306e<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306b\u3064\u3044\u3066\u3001\u57fa\u672c\u304b\u3089\u5fdc\u7528\u307e\u3067\u5fb9\u5e95\u7684\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002<br>\u521d\u5fc3\u8005\u306e\u65b9\u304b\u3089\u7d4c\u9a13\u8c4a\u5bcc\u306a\u958b\u767a\u8005\u307e\u3067\u3001\u304d\u3063\u3068\u65b0\u3057\u3044\u767a\u898b\u304c\u3042\u308b\u306f\u305a\u3067\u3059\u3002<br>\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u30ab\u30d0\u30fc\u3057\u3066\u3044\u304d\u307e\u3059\u306e\u3067\u3001\u6700\u5f8c\u307e\u3067\u304a\u4ed8\u304d\u5408\u3044\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Ruby\u306esplit\u30e1\u30bd\u30c3\u30c9\uff1a\u57fa\u672c\u304b\u3089\u5fdc\u7528\u307e\u3067<\/li>\n\n\n\n<li>split\u30e1\u30bd\u30c3\u30c9\u306e7\u3064\u306e\u5b9f\u8df5\u7684\u30c6\u30af\u30cb\u30c3\u30af<\/li>\n\n\n\n<li>split\u30e1\u30bd\u30c3\u30c9\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6700\u9069\u5316<\/li>\n\n\n\n<li>split\u30e1\u30bd\u30c3\u30c9\u3068\u4ed6\u306e\u6587\u5b57\u5217\u64cd\u4f5c\u30e1\u30bd\u30c3\u30c9\u306e\u6bd4\u8f03<\/li>\n\n\n\n<li>\u5b9f\u969b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306esplit\u30e1\u30bd\u30c3\u30c9\u6d3b\u7528\u4f8b<\/li>\n\n\n\n<li>split\u30e1\u30bd\u30c3\u30c9\u306e\u6ce8\u610f\u70b9\u3068\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/li>\n\n\n\n<li>\u307e\u3068\u3081\uff1aRuby\u306esplit\u30e1\u30bd\u30c3\u30c9\u30de\u30b9\u30bf\u30fc\u3078\u306e\u9053<\/li>\n<\/ol>\n\n\n\n<p>\u3055\u3042\u3001Ruby\u306e<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u30de\u30b9\u30bf\u30fc\u3059\u308b\u65c5\u306b\u51fa\u767a\u3057\u307e\u3057\u3087\u3046\uff01<br>\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u307f\u7d42\u3048\u308c\u3070\u3001\u3042\u306a\u305f\u3082\u6587\u5b57\u5217\u64cd\u4f5c\u306e\u30a8\u30ad\u30b9\u30d1\u30fc\u30c8\u306b\u306a\u308c\u308b\u3053\u3068\u9593\u9055\u3044\u306a\u3057\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-1\">1. Ruby\u306esplit\u30e1\u30bd\u30c3\u30c9\uff1a\u57fa\u672c\u304b\u3089\u5fdc\u7528\u307e\u3067<\/h3>\n\n\n\n<p>Ruby\u306e<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u6587\u5b57\u5217\u64cd\u4f5c\u306e\u4e2d\u3067\u3082\u7279\u306b\u91cd\u8981\u306a\u4f4d\u7f6e\u3092\u5360\u3081\u308b\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<br>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u304b\u3089\u3001\u3088\u308a\u9ad8\u5ea6\u306a\u5fdc\u7528\u30c6\u30af\u30cb\u30c3\u30af\u307e\u3067\u3092\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-2\">split\u30e1\u30bd\u30c3\u30c9\u3068\u306f\uff1f\u6587\u5b57\u5217\u3092\u7c21\u5358\u306b\u5206\u5272\u3059\u308b\u9b54\u6cd5\u306e\u30c4\u30fc\u30eb<\/h4>\n\n\n\n<p><code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u6587\u5b57\u5217\u3092\u7279\u5b9a\u306e\u533a\u5207\u308a\u6587\u5b57\uff08\u30c7\u30ea\u30df\u30bf\uff09\u3067\u5206\u5272\u3057\u3001\u305d\u306e\u7d50\u679c\u3092\u914d\u5217\u3068\u3057\u3066\u8fd4\u3059\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002<br>\u57fa\u672c\u7684\u306a\u69cb\u6587\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\u6587\u5b57\u5217.split(\u533a\u5207\u308a\u6587\u5b57)<\/pre>\n\n\n\n<p>\u3053\u306e\u30b7\u30f3\u30d7\u30eb\u306a\u69cb\u6587\u306e\u88cf\u306b\u306f\u3001\u975e\u5e38\u306b\u67d4\u8edf\u3067\u5f37\u529b\u306a\u6a5f\u80fd\u304c\u96a0\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-3\">\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\uff1a\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u7a7a\u767d\u6587\u5b57\u3067\u306e\u5206\u5272<\/h4>\n\n\n\n<p><code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u5f15\u6570\u306a\u3057\u3067\u547c\u3073\u51fa\u3059\u3068\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u7a7a\u767d\u6587\u5b57\uff08\u30b9\u30da\u30fc\u30b9\u3001\u30bf\u30d6\u3001\u6539\u884c\u306a\u3069\uff09\u3092\u533a\u5207\u308a\u6587\u5b57\u3068\u3057\u3066\u4f7f\u7528\u3057\u307e\u3059\u3002<br>\u3053\u308c\u306f\u3001\u6587\u7ae0\u3092\u5358\u8a9e\u306b\u5206\u5272\u3059\u308b\u969b\u306b\u975e\u5e38\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sentence = \"Ruby is a dynamic programming language\"\nwords = sentence.split\nputs words.inspect\n## \u51fa\u529b: [\"Ruby\", \"is\", \"a\", \"dynamic\", \"programming\", \"language\"]<\/pre>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306f\u7c21\u5358\u306b\u6587\u7ae0\u3092\u5358\u8a9e\u306b\u5206\u5272\u3067\u304d\u307e\u3059\u3002<br>\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u52d5\u4f5c\u3067\u306f\u3001\u9023\u7d9a\u3057\u305f\u7a7a\u767d\u6587\u5b57\u306f1\u3064\u306e\u533a\u5207\u308a\u3068\u3057\u3066\u6271\u308f\u308c\u308b\u305f\u3081\u3001\u4f59\u5206\u306a\u7a7a\u306e\u8981\u7d20\u304c\u914d\u5217\u306b\u542b\u307e\u308c\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-4\">\u30ab\u30b9\u30bf\u30e0\u533a\u5207\u308a\u6587\u5b57\u3092\u4f7f\u3063\u305f\u5206\u5272\u30c6\u30af\u30cb\u30c3\u30af<\/h4>\n\n\n\n<p><code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306e\u771f\u306e\u529b\u306f\u3001\u30ab\u30b9\u30bf\u30e0\u533a\u5207\u308a\u6587\u5b57\u3092\u4f7f\u7528\u3059\u308b\u969b\u306b\u767a\u63ee\u3055\u308c\u307e\u3059\u3002<br>\u4f8b\u3048\u3070\u3001\u30ab\u30f3\u30de\u533a\u5207\u308a\u306e\u30c7\u30fc\u30bf\u3092\u5206\u5272\u3059\u308b\u5834\u5408\u306f\u6b21\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">csv_data = \"apple,banana,cherry,date\"\nfruits = csv_data.split(',')\nputs fruits.inspect\n## \u51fa\u529b: [\"apple\", \"banana\", \"cherry\", \"date\"]<\/pre>\n\n\n\n<p>\u3055\u3089\u306b\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306f\u6b63\u898f\u8868\u73fe\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002<br>\u3053\u308c\u306b\u3088\u308a\u3001\u3088\u308a\u8907\u96d1\u306a\u5206\u5272\u30d1\u30bf\u30fc\u30f3\u3092\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">complex_string = \"ruby:python;javascript,php\"\nlanguages = complex_string.split(\/[:;,]\/)\nputs languages.inspect\n## \u51fa\u529b: [\"ruby\", \"python\", \"javascript\", \"php\"]<\/pre>\n\n\n\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u30b3\u30ed\u30f3\u3001\u30bb\u30df\u30b3\u30ed\u30f3\u3001\u30ab\u30f3\u30de\u306e\u3044\u305a\u308c\u304b\u3092\u533a\u5207\u308a\u6587\u5b57\u3068\u3057\u3066\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-5\">\u5fdc\u7528\uff1a\u9650\u5b9a\u5206\u5272\u3068\u7a7a\u8981\u7d20\u306e\u6271\u3044<\/h4>\n\n\n\n<p><code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306b\u306f\u3001\u3055\u3089\u306b\u9ad8\u5ea6\u306a\u4f7f\u3044\u65b9\u304c\u3042\u308a\u307e\u3059\u3002<br>\u4f8b\u3048\u3070\u3001\u5206\u5272\u3059\u308b\u56de\u6570\u3092\u5236\u9650\u3057\u305f\u308a\u3001\u7a7a\u306e\u8981\u7d20\u3092\u4fdd\u6301\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">## \u5206\u5272\u56de\u6570\u306e\u5236\u9650\nlimited_split = \"a-b-c-d-e\".split('-', 3)\nputs limited_split.inspect\n## \u51fa\u529b: [\"a\", \"b\", \"c-d-e\"]\n\n## \u7a7a\u306e\u8981\u7d20\u3092\u4fdd\u6301\nkeep_empty = \"a::b:c::d\".split(':', -1)\nputs keep_empty.inspect\n## \u51fa\u529b: [\"a\", \"\", \"b\", \"c\", \"\", \"d\"]<\/pre>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u9ad8\u5ea6\u306a\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3059\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u67d4\u8edf\u306a\u6587\u5b57\u5217\u51e6\u7406\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-6\">\u307e\u3068\u3081<\/h4>\n\n\n\n<p>Ruby\u306e<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u30b7\u30f3\u30d7\u30eb\u3067\u3042\u308a\u306a\u304c\u3089\u975e\u5e38\u306b\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002<br>\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u304b\u3089\u5fdc\u7528\u30c6\u30af\u30cb\u30c3\u30af\u307e\u3067\u3001\u69d8\u3005\u306a\u30b7\u30fc\u30f3\u3067\u6d3b\u7528\u3067\u304d\u308b\u3053\u3068\u304c\u304a\u308f\u304b\u308a\u3044\u305f\u3060\u3051\u305f\u3067\u3057\u3087\u3046\u304b\u3002<br>\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u3055\u3089\u306b\u5b9f\u8df5\u7684\u306a<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306e\u4f7f\u3044\u65b9\u30927\u3064\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3068\u3057\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<br>\u3053\u308c\u3089\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u5b66\u3076\u3053\u3068\u3067\u3001\u3042\u306a\u305f\u306eRuby\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30b9\u30ad\u30eb\u306f\u78ba\u5b9f\u306b\u5411\u4e0a\u3059\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-7\">2. split\u30e1\u30bd\u30c3\u30c9\u306e7\u3064\u306e\u5b9f\u8df5\u7684\u30c6\u30af\u30cb\u30c3\u30af<\/h3>\n\n\n\n<p>Ruby\u306e<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u3060\u3051\u3067\u306a\u304f\u3001\u69d8\u3005\u306a\u9ad8\u5ea6\u306a\u30c6\u30af\u30cb\u30c3\u30af\u3092\u99c6\u4f7f\u3059\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u8907\u96d1\u306a\u6587\u5b57\u5217\u64cd\u4f5c\u3092\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<br>\u3053\u3053\u3067\u306f\u3001\u5b9f\u8df5\u3067\u5f79\u7acb\u30647\u3064\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<br>\u3053\u308c\u3089\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u7fd2\u5f97\u3059\u308b\u3053\u3068\u3067\u3001\u3042\u306a\u305f\u306eRuby\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u30b9\u30ad\u30eb\u306f\u4e00\u6bb5\u3068\u5411\u4e0a\u3059\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-8\">\u30c6\u30af\u30cb\u30c3\u30af1\uff1a\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u3063\u305f\u9ad8\u5ea6\u306a\u5206\u5272<\/h4>\n\n\n\n<p>\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u8907\u96d1\u306a\u30d1\u30bf\u30fc\u30f3\u306b\u57fa\u3065\u3044\u3066\u6587\u5b57\u5217\u3092\u5206\u5272\u3067\u304d\u307e\u3059\u3002<br>\u3053\u308c\u306f\u7279\u306b\u3001\u8907\u6570\u306e\u533a\u5207\u308a\u6587\u5b57\u304c\u6df7\u5728\u3059\u308b\u30c7\u30fc\u30bf\u3092\u6271\u3046\u969b\u306b\u975e\u5e38\u306b\u6709\u7528\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">text = \"apple,banana;cherry:date\"\nfruits = text.split(\/[,;:]\/)\nputs fruits.inspect\n## \u51fa\u529b: [\"apple\", \"banana\", \"cherry\", \"date\"]<\/pre>\n\n\n\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u30ab\u30f3\u30de\u3001\u30bb\u30df\u30b3\u30ed\u30f3\u3001\u30b3\u30ed\u30f3\u306e\u3044\u305a\u308c\u304b\u3092\u533a\u5207\u308a\u6587\u5b57\u3068\u3057\u3066\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<br>\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u67d4\u8edf\u306a\u5206\u5272\u30d1\u30bf\u30fc\u30f3\u3092\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-9\">\u30c6\u30af\u30cb\u30c3\u30af2\uff1a\u9650\u5b9a\u5206\u5272\u3067\u914d\u5217\u306e\u8981\u7d20\u6570\u3092\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb<\/h4>\n\n\n\n<p><code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306e\u7b2c\u4e8c\u5f15\u6570\u306b\u6570\u5024\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u5206\u5272\u56de\u6570\u3092\u5236\u9650\u3067\u304d\u307e\u3059\u3002<br>\u3053\u308c\u306f\u3001\u6587\u5b57\u5217\u306e\u4e00\u90e8\u3060\u3051\u3092\u5206\u5272\u3057\u305f\u3044\u5834\u5408\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">text = \"ruby,python,javascript,php,go\"\nlanguages = text.split(',', 3)\nputs languages.inspect\n## \u51fa\u529b: [\"ruby\", \"python\", \"javascript,php,go\"]<\/pre>\n\n\n\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u6700\u521d\u306e2\u3064\u306e\u30ab\u30f3\u30de\u3067\u306e\u307f\u5206\u5272\u3057\u3001\u6b8b\u308a\u306e\u90e8\u5206\u306f1\u3064\u306e\u8981\u7d20\u3068\u3057\u3066\u6271\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-10\">\u30c6\u30af\u30cb\u30c3\u30af3\uff1a\u9023\u7d9a\u3057\u305f\u533a\u5207\u308a\u6587\u5b57\u306e\u51e6\u7406<\/h4>\n\n\n\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306f\u9023\u7d9a\u3057\u305f\u533a\u5207\u308a\u6587\u5b57\u30921\u3064\u3068\u3057\u3066\u6271\u3044\u307e\u3059\u3002<br>\u3057\u304b\u3057\u3001\u7a7a\u306e\u8981\u7d20\u3092\u4fdd\u6301\u3057\u305f\u3044\u5834\u5408\u3082\u3042\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">## \u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u52d5\u4f5c\ntext = \"a,,b,c,,d\"\ndefault_split = text.split(',')\nputs default_split.inspect\n## \u51fa\u529b: [\"a\", \"b\", \"c\", \"d\"]\n\n## \u7a7a\u306e\u8981\u7d20\u3092\u4fdd\u6301\u3059\u308b\nkeep_empty = text.split(',', -1)\nputs keep_empty.inspect\n## \u51fa\u529b: [\"a\", \"\", \"b\", \"c\", \"\", \"d\"]<\/pre>\n\n\n\n<p>\u7b2c\u4e8c\u5f15\u6570\u306b\u8ca0\u306e\u5024\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u7a7a\u306e\u8981\u7d20\u3092\u4fdd\u6301\u3067\u304d\u307e\u3059\u3002<br>\u3053\u308c\u306f\u3001CSV\u30c7\u30fc\u30bf\u306e\u30d1\u30fc\u30b9\u306a\u3069\u3001\u7a7a\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u91cd\u8981\u306a\u610f\u5473\u3092\u6301\u3064\u5834\u5408\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-11\">\u30c6\u30af\u30cb\u30c3\u30af4\uff1a\u5148\u982d\u3068\u672b\u5c3e\u306e\u7a7a\u767d\u3092\u7121\u8996\u3059\u308b\u65b9\u6cd5<\/h4>\n\n\n\n<p>\u6587\u5b57\u5217\u306e\u524d\u5f8c\u306e\u7a7a\u767d\u3092\u7121\u8996\u3057\u3066\u5206\u5272\u3057\u305f\u3044\u5834\u5408\u306f\u3001<code>strip<\/code>\u30e1\u30bd\u30c3\u30c9\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u306e\u304c\u52b9\u679c\u7684\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">text = \"  ruby  ,  python  ,  javascript  \"\nlanguages = text.strip.split(',').map(&amp;:strip)\nputs languages.inspect\n## \u51fa\u529b: [\"ruby\", \"python\", \"javascript\"]<\/pre>\n\n\n\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u307e\u305a\u6587\u5b57\u5217\u5168\u4f53\u306e\u524d\u5f8c\u306e\u7a7a\u767d\u3092\u9664\u53bb\u3057\u3001\u305d\u306e\u5f8c\u5206\u5272\u3092\u884c\u3044\u3001\u3055\u3089\u306b\u5404\u8981\u7d20\u306e\u524d\u5f8c\u306e\u7a7a\u767d\u3082\u9664\u53bb\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-12\">\u30c6\u30af\u30cb\u30c3\u30af5\uff1a\u8907\u6570\u306e\u533a\u5207\u308a\u6587\u5b57\u3092\u4f7f\u7528\u3057\u305f\u5206\u5272<\/h4>\n\n\n\n<p>\u30c6\u30af\u30cb\u30c3\u30af1\u3067\u7d39\u4ecb\u3057\u305f\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u8907\u6570\u306e\u7570\u306a\u308b\u533a\u5207\u308a\u6587\u5b57\u3092\u540c\u6642\u306b\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">text = \"apple,banana;cherry|date:grape\"\nfruits = text.split(\/[,;|:]\/)\nputs fruits.inspect\n## \u51fa\u529b: [\"apple\", \"banana\", \"cherry\", \"date\", \"grape\"]<\/pre>\n\n\n\n<p>\u3053\u306e\u65b9\u6cd5\u306f\u3001\u8907\u6570\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u304c\u6df7\u5728\u3059\u308b\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u969b\u306b\u975e\u5e38\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-13\">\u30c6\u30af\u30cb\u30c3\u30af6\uff1a\u30d6\u30ed\u30c3\u30af\u3092\u4f7f\u3063\u305f\u52d5\u7684\u306a\u5206\u5272\u51e6\u7406<\/h4>\n\n\n\n<p><code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306b\u30d6\u30ed\u30c3\u30af\u3092\u6e21\u3059\u3053\u3068\u3067\u3001\u5206\u5272\u5f8c\u306e\u5404\u8981\u7d20\u3092\u52d5\u7684\u306b\u52a0\u5de5\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">text = \"ruby, python, javascript\"\nlanguages = text.split(',') { |s| s.strip.capitalize }\nputs languages.inspect\n## \u51fa\u529b: [\"Ruby\", \"Python\", \"Javascript\"]<\/pre>\n\n\n\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u5206\u5272\u3068\u540c\u6642\u306b\u5404\u8981\u7d20\u306e\u524d\u5f8c\u306e\u7a7a\u767d\u3092\u9664\u53bb\u3057\u3001\u5148\u982d\u3092\u5927\u6587\u5b57\u306b\u5909\u63db\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-14\">\u30c6\u30af\u30cb\u30c3\u30af7\uff1a\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3057\u306a\u3044\u5206\u5272<\/h4>\n\n\n\n<p>\u6b63\u898f\u8868\u73fe\u306ei\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u533a\u5225\u305b\u305a\u306b\u5206\u5272\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">text = \"Apple,BANANA,Cherry,date\"\nfruits = text.split(\/,\/i)\nputs fruits.inspect\n## \u51fa\u529b: [\"Apple\", \"BANANA\", \"Cherry\", \"date\"]<\/pre>\n\n\n\n<p>\u3053\u306e\u65b9\u6cd5\u306f\u3001\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u306e\u9055\u3044\u3092\u7121\u8996\u3057\u305f\u3044\u5834\u5408\u306b\u6709\u7528\u3067\u3059\u3002<br>\u305f\u3060\u3057\u3001\u3053\u306e\u4f8b\u3067\u306f\u5b9f\u969b\u306e\u5206\u5272\u306b\u306f\u5f71\u97ff\u3057\u307e\u305b\u3093\u304c\u3001\u3088\u308a\u8907\u96d1\u306a\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528\u3059\u308b\u969b\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3089\u306e7\u3064\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u9069\u5207\u306b\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u307b\u3068\u3093\u3069\u306e\u6587\u5b57\u5217\u5206\u5272\u306e\u30b7\u30ca\u30ea\u30aa\u306b\u5bfe\u5fdc\u3067\u304d\u308b\u3067\u3057\u3087\u3046\u3002<br>\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u4f7f\u7528\u3059\u308b\u969b\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306b\u3064\u3044\u3066\u8003\u5bdf\u3057\u307e\u3059\u3002<br><code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u52b9\u7387\u7684\u306b\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u3042\u306a\u305f\u306eRuby\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u6027\u80fd\u3092\u6700\u9069\u5316\u3067\u304d\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-15\">3. split\u30e1\u30bd\u30c3\u30c9\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6700\u9069\u5316<\/h3>\n\n\n\n<p>Ruby\u306e<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306f\u975e\u5e38\u306b\u4fbf\u5229\u3067\u3059\u304c\u3001\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u3092\u6271\u3046\u5834\u5408\u3084\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u30af\u30ea\u30c6\u30a3\u30ab\u30eb\u306a\u5834\u9762\u3067\u306f\u3001\u305d\u306e\u4f7f\u7528\u65b9\u6cd5\u306b\u6ce8\u610f\u3092\u6255\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u6700\u9069\u5316\u3059\u308b\u30c6\u30af\u30cb\u30c3\u30af\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-16\">\u5927\u898f\u6a21\u30c7\u30fc\u30bf\u3067\u306esplit\u306e\u52b9\u7387\u7684\u306a\u4f7f\u7528\u6cd5<\/h4>\n\n\n\n<p>\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u969b\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3068\u51e6\u7406\u901f\u5ea6\u304c\u91cd\u8981\u306a\u8ab2\u984c\u3068\u306a\u308a\u307e\u3059\u3002<br>\u4ee5\u4e0b\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u52b9\u7387\u7684\u306b<code>split<\/code>\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-17\">1. <strong>\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u51e6\u7406\u306e\u5229\u7528<\/strong><\/h5>\n\n\n\n<p>\u5927\u304d\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u4e00\u5ea6\u306b\u30e1\u30e2\u30ea\u306b\u8aad\u307f\u8fbc\u3080\u306e\u3067\u306f\u306a\u304f\u30011\u884c\u305a\u3064\u51e6\u7406\u3059\u308b\u65b9\u6cd5\u3092\u8003\u3048\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   File.open('large_file.txt', 'r') do |file|\n     file.each_line do |line|\n       words = line.split\n       # \u5404\u884c\u306b\u5bfe\u3059\u308b\u51e6\u7406\n     end\n   end<\/pre>\n\n\n\n<p>\u3053\u306e\u65b9\u6cd5\u306b\u3088\u308a\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u6291\u3048\u3064\u3064\u3001\u5927\u898f\u6a21\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u52b9\u7387\u7684\u306b\u51e6\u7406\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-18\">2. <strong>\u9045\u5ef6\u8a55\u4fa1\uff08Enumerator\uff09\u306e\u6d3b\u7528<\/strong><\/h5>\n\n\n\n<p><code>split<\/code>\u306e\u7d50\u679c\u3092\u5373\u5ea7\u306b\u914d\u5217\u306b\u5909\u63db\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u8a55\u4fa1\u3059\u308b\u65b9\u6cd5\u3082\u6709\u52b9\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   large_string = \"very large string with many words\"\n   words = large_string.split.lazy.map(&amp;:upcase).take(5).force<\/pre>\n\n\n\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u6700\u521d\u306e5\u3064\u306e\u5358\u8a9e\u3060\u3051\u3092\u5927\u6587\u5b57\u306b\u5909\u63db\u3057\u3066\u3044\u307e\u3059\u3002<br><code>lazy<\/code>\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001\u4e0d\u8981\u306a\u51e6\u7406\u3092\u56de\u907f\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-19\">\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u6291\u3048\u308b\u30c6\u30af\u30cb\u30c3\u30af<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-20\">1. <strong>\u5fc5\u8981\u6700\u5c0f\u9650\u306e\u5206\u5272<\/strong><\/h5>\n\n\n\n<p>\u5206\u5272\u56de\u6570\u3092\u5236\u9650\u3059\u308b\u3053\u3068\u3067\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u6291\u3048\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   first_two_fields = large_csv_string.split(',', 3)[0..1]<\/pre>\n\n\n\n<p>\u3053\u306e\u65b9\u6cd5\u3067\u306f\u3001\u6700\u521d\u306e2\u3064\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3060\u3051\u3092\u53d6\u5f97\u3057\u3001\u6b8b\u308a\u306e\u90e8\u5206\u306f\u51e6\u7406\u3057\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-21\">2. <strong>\u5927\u304d\u306a\u6587\u5b57\u5217\u306e\u90e8\u5206\u7684\u306a\u51e6\u7406<\/strong><\/h5>\n\n\n\n<p><code>String#byteslice<\/code>\u3084<code>String#[start, length]<\/code>\u3092\u4f7f\u7528\u3057\u3066\u3001\u6587\u5b57\u5217\u306e\u4e00\u90e8\u3060\u3051\u3092\u51e6\u7406\u3059\u308b\u65b9\u6cd5\u3082\u52b9\u679c\u7684\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   large_string = \"very large string\"\n   first_10_chars = large_string[0, 10].split<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-22\">\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6e2c\u5b9a\u3068\u6700\u9069\u5316<\/h4>\n\n\n\n<p>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u6700\u9069\u5316\u3092\u884c\u3046\u969b\u306f\u3001\u307e\u305a\u73fe\u72b6\u3092\u6b63\u78ba\u306b\u628a\u63e1\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002<br>Ruby\u306b\u306f\u4fbf\u5229\u306a\u6e2c\u5b9a\u30c4\u30fc\u30eb\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-23\">1. <strong>Benchmark\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u4f7f\u7528<\/strong><\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   require 'benchmark'\n\n   string = \"a,b,c\" * 1000000\n\n   Benchmark.bm do |x|\n     x.report(\"Simple split:\") { string.split(',') }\n     x.report(\"Regex split:\") { string.split(\/,\/) }\n   end<\/pre>\n\n\n\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u5358\u7d14\u306a\u6587\u5b57\u3067\u306e\u5206\u5272\u3068\u6b63\u898f\u8868\u73fe\u3067\u306e\u5206\u5272\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u6bd4\u8f03\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-24\">2. <strong>\u30e1\u30e2\u30ea\u30d7\u30ed\u30d5\u30a1\u30a4\u30ea\u30f3\u30b0<\/strong><\/h5>\n\n\n\n<p><code>memory_profiler<\/code> gem\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u8a73\u7d30\u306b\u5206\u6790\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   require 'memory_profiler'\n\n   report = MemoryProfiler.report do\n     # \u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u6e2c\u5b9a\u3057\u305f\u3044\u30b3\u30fc\u30c9\n   end\n\n   report.pretty_print<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-25\">\u6ce8\u610f\u70b9<\/h4>\n\n\n\n<p>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u6700\u9069\u5316\u306f\u91cd\u8981\u3067\u3059\u304c\u3001\u904e\u5ea6\u306a\u6700\u9069\u5316\u306f\u30b3\u30fc\u30c9\u306e\u53ef\u8aad\u6027\u3092\u4f4e\u4e0b\u3055\u305b\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<br>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8981\u4ef6\u3068\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u53d6\u308a\u306a\u304c\u3089\u3001\u9069\u5207\u306a\u6700\u9069\u5316\u3092\u884c\u3046\u3053\u3068\u304c\u5927\u5207\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001Ruby\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3088\u3063\u3066<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306e\u6319\u52d5\u3084\u6027\u80fd\u304c\u7570\u306a\u308b\u5834\u5408\u304c\u3042\u308b\u306e\u3067\u3001\u4f7f\u7528\u3057\u3066\u3044\u308bRuby\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306e\u30c6\u30b9\u30c8\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u9069\u5207\u306b\u6d3b\u7528\u3059\u308b\u3053\u3068\u3067\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u969b\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u5927\u5e45\u306b\u6539\u5584\u3067\u304d\u307e\u3059\u3002<br>\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u3068\u4ed6\u306e\u6587\u5b57\u5217\u64cd\u4f5c\u30e1\u30bd\u30c3\u30c9\u3092\u6bd4\u8f03\u3057\u3001\u9069\u5207\u306a\u4f7f\u3044\u5206\u3051\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-26\">4. split\u30e1\u30bd\u30c3\u30c9\u3068\u4ed6\u306e\u6587\u5b57\u5217\u64cd\u4f5c\u30e1\u30bd\u30c3\u30c9\u306e\u6bd4\u8f03<\/h3>\n\n\n\n<p>Ruby\u306b\u306f<code>split<\/code>\u4ee5\u5916\u306b\u3082\u5f37\u529b\u306a\u6587\u5b57\u5217\u64cd\u4f5c\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308a\u307e\u3059\u3002<br>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u3068\u4ed6\u306e\u4e3b\u8981\u306a\u6587\u5b57\u5217\u64cd\u4f5c\u30e1\u30bd\u30c3\u30c9\uff08<code>slice<\/code>, <code>scan<\/code>, <code>partition<\/code>\uff09\u3092\u6bd4\u8f03\u3057\u3001\u305d\u308c\u305e\u308c\u306e\u7279\u5fb4\u3068\u9069\u5207\u306a\u4f7f\u7528\u30b7\u30fc\u30f3\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-27\">slice vs split\uff1a\u7528\u9014\u306b\u3088\u308b\u4f7f\u3044\u5206\u3051<\/h4>\n\n\n\n<p><code>slice<\/code>\u30e1\u30bd\u30c3\u30c9\u3068<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u4e00\u898b\u4f3c\u3066\u3044\u308b\u3088\u3046\u306b\u898b\u3048\u307e\u3059\u304c\u3001\u305d\u306e\u7528\u9014\u306f\u5927\u304d\u304f\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>split<\/code>: \u6587\u5b57\u5217\u5168\u4f53\u3092\u7279\u5b9a\u306e\u533a\u5207\u308a\u6587\u5b57\u3067\u5206\u5272\u3057\u3001\u7d50\u679c\u3092\u914d\u5217\u3068\u3057\u3066\u8fd4\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><code>slice<\/code>: \u6587\u5b57\u5217\u304b\u3089\u7279\u5b9a\u306e\u90e8\u5206\u3092\u62bd\u51fa\u3057\u3001\u65b0\u3057\u3044\u6587\u5b57\u5217\u3068\u3057\u3066\u8fd4\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u4ee5\u4e0b\u306b\u5177\u4f53\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">text = \"Ruby is a dynamic programming language\"\n\n## split\u306e\u4f7f\u7528\u4f8b\nwords = text.split\nputs words.inspect\n## \u51fa\u529b: [\"Ruby\", \"is\", \"a\", \"dynamic\", \"programming\", \"language\"]\n\n## slice\u306e\u4f7f\u7528\u4f8b\nfirst_word = text.slice(0, 4)\nputs first_word\n## \u51fa\u529b: \"Ruby\"<\/pre>\n\n\n\n<p><code>split<\/code>\u306f\u6587\u5b57\u5217\u5168\u4f53\u3092\u51e6\u7406\u3059\u308b\u306e\u306b\u5bfe\u3057\u3001<code>slice<\/code>\u306f\u7279\u5b9a\u306e\u90e8\u5206\u306e\u307f\u3092\u62bd\u51fa\u3057\u307e\u3059\u3002<br><code>split<\/code>\u306f\u4e00\u822c\u7684\u306a\u6587\u5b57\u5217\u5206\u5272\u306b\u6700\u9069\u3067\u3042\u308a\u3001<code>slice<\/code>\u306f\u7279\u5b9a\u306e\u90e8\u5206\u6587\u5b57\u5217\u306e\u62bd\u51fa\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-28\">scan\u3001partition\u3001split\u306e\u4f7f\u3044\u5206\u3051\u30ac\u30a4\u30c9<\/h4>\n\n\n\n<p><code>scan<\/code>\u3001<code>partition<\/code>\u3001<code>split<\/code>\u306f\u305d\u308c\u305e\u308c\u7570\u306a\u308b\u7279\u5fb4\u3092\u6301\u3061\u3001\u9069\u5207\u306a\u4f7f\u7528\u30b7\u30fc\u30f3\u304c\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-29\">1. <strong><code>scan<\/code><\/strong><\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6b63\u898f\u8868\u73fe\u306b\u30de\u30c3\u30c1\u3059\u308b\u5168\u3066\u306e\u90e8\u5206\u3092\u62bd\u51fa\u3057\u3001\u914d\u5217\u3092\u8fd4\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u91cd\u8907\u3092\u8a31\u5bb9\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30de\u30c3\u30c1\u3057\u306a\u3044\u5834\u5408\u306f\u7a7a\u306e\u914d\u5217\u3092\u8fd4\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-30\">2. <strong><code>partition<\/code><\/strong><\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3057\u305f\u30bb\u30d1\u30ec\u30fc\u30bf\u30673\u3064\u306e\u90e8\u5206\u306b\u5206\u5272\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30bb\u30d1\u30ec\u30fc\u30bf\u306e\u524d\u3001\u30bb\u30d1\u30ec\u30fc\u30bf\u81ea\u4f53\u3001\u30bb\u30d1\u30ec\u30fc\u30bf\u306e\u5f8c\u306e3\u8981\u7d20\u306e\u914d\u5217\u3092\u8fd4\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u30de\u30c3\u30c1\u3057\u306a\u3044\u5834\u5408\u3001\u5143\u306e\u6587\u5b57\u5217\u30682\u3064\u306e\u7a7a\u6587\u5b57\u5217\u3092\u8fd4\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-31\">3. <strong><code>split<\/code><\/strong><\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6587\u5b57\u5217\u3092\u7279\u5b9a\u306e\u533a\u5207\u308a\u6587\u5b57\u3067\u5206\u5272\u3057\u3001\u914d\u5217\u3092\u8fd4\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528\u53ef\u80fd\u3067\u3059\u3002<\/li>\n\n\n\n<li>\u5206\u5272\u56de\u6570\u306e\u5236\u9650\u304c\u53ef\u80fd\u3067\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u4ee5\u4e0b\u306b\u3001\u3053\u308c\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u306e\u4f7f\u7528\u4f8b\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">text = \"ruby:python:javascript\"\n\n## scan\u306e\u4f7f\u7528\u4f8b\nlanguages = text.scan(\/\\w+\/)\nputs languages.inspect\n## \u51fa\u529b: [\"ruby\", \"python\", \"javascript\"]\n\n## partition\u306e\u4f7f\u7528\u4f8b\nbefore, separator, after = text.partition(':')\nputs [before, separator, after].inspect\n## \u51fa\u529b: [\"ruby\", \":\", \"python:javascript\"]\n\n## split\u306e\u4f7f\u7528\u4f8b\nall_languages = text.split(':')\nputs all_languages.inspect\n## \u51fa\u529b: [\"ruby\", \"python\", \"javascript\"]<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-32\">\u4f7f\u3044\u5206\u3051\u306e\u30ac\u30a4\u30c9\u30e9\u30a4\u30f3<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>split<\/code>\u306f\u4e00\u822c\u7684\u306a\u6587\u5b57\u5217\u5206\u5272\u306b\u6700\u9069\u3067\u3059\u3002\u8907\u6570\u306e\u533a\u5207\u308a\u6587\u5b57\u3067\u6587\u5b57\u5217\u3092\u5206\u5272\u3059\u308b\u5834\u5408\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><code>slice<\/code>\u306f\u7279\u5b9a\u306e\u90e8\u5206\u6587\u5b57\u5217\u306e\u62bd\u51fa\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3084\u7bc4\u56f2\u3092\u6307\u5b9a\u3057\u3066\u6587\u5b57\u5217\u306e\u4e00\u90e8\u3092\u53d6\u308a\u51fa\u3059\u5834\u5408\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u3002<\/li>\n\n\n\n<li><code>scan<\/code>\u306f\u6b63\u898f\u8868\u73fe\u306b\u57fa\u3065\u304f\u7e70\u308a\u8fd4\u3057\u62bd\u51fa\u306b\u6709\u7528\u3067\u3059\u3002\u6587\u5b57\u5217\u5185\u306e\u7279\u5b9a\u306e\u30d1\u30bf\u30fc\u30f3\u306b\u4e00\u81f4\u3059\u308b\u5168\u3066\u306e\u90e8\u5206\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/li>\n\n\n\n<li><code>partition<\/code>\u306f\u6587\u5b57\u5217\u30923\u3064\u306e\u90e8\u5206\uff08\u30bb\u30d1\u30ec\u30fc\u30bf\u306e\u524d\u3001\u30bb\u30d1\u30ec\u30fc\u30bf\u3001\u30bb\u30d1\u30ec\u30fc\u30bf\u306e\u5f8c\uff09\u306b\u5206\u5272\u3059\u308b\u969b\u306b\u4fbf\u5229\u3067\u3059\u3002\u6700\u521d\u306b\u51fa\u73fe\u3059\u308b\u30bb\u30d1\u30ec\u30fc\u30bf\u3092\u57fa\u6e96\u306b\u5206\u5272\u3057\u305f\u3044\u5834\u5408\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u9069\u5207\u306b\u4f7f\u3044\u5206\u3051\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u52b9\u7387\u7684\u3067\u8aad\u307f\u3084\u3059\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br>\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u969b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3069\u306e\u3088\u3046\u306b\u6d3b\u7528\u3067\u304d\u308b\u304b\u3092\u5177\u4f53\u7684\u306a\u4f8b\u3092\u901a\u3058\u3066\u898b\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-33\">\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3068\u53ef\u8aad\u6027\u306e\u8003\u616e<\/h4>\n\n\n\n<p>\u30e1\u30bd\u30c3\u30c9\u306e\u9078\u629e\u306f\u3001\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3068\u53ef\u8aad\u6027\u306e\u30d0\u30e9\u30f3\u30b9\u3092\u8003\u616e\u3057\u3066\u884c\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-sgb-block-simple sgb-box-simple sgb-box-simple--title-normal sgb-box-simple--with-border\"><div style=\"background-color:var(--wp--preset--color--sango-main);color:#FFF\" class=\"sgb-box-simple__title\">\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u8003\u616e\u3059\u308b\u969b\u306b\u6ce8\u610f\u3059\u3079\u304d3\u70b9<\/div><div class=\"sgb-box-simple__body\" style=\"border-color:var(--wp--preset--color--sango-main);background-color:#FFF\">\n<ul class=\"wp-block-list\">\n<li><code>split<\/code>\u306f\u4e00\u822c\u7684\u306b\u9ad8\u901f\u3067\u3059\u304c\u3001\u8907\u96d1\u306a\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u304c\u4f4e\u4e0b\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n\n\n\n<li><code>scan<\/code>\u306f\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u3001\u8907\u96d1\u306a\u30d1\u30bf\u30fc\u30f3\u30de\u30c3\u30c1\u30f3\u30b0\u306b\u9069\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u5834\u5408\u306f\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/li>\n\n\n\n<li><code>slice<\/code>\u3068<code>partition<\/code>\u306f\u6bd4\u8f03\u7684\u30b7\u30f3\u30d7\u30eb\u306a\u64cd\u4f5c\u306e\u305f\u3081\u3001\u591a\u304f\u306e\u5834\u5408\u9ad8\u901f\u3067\u3059\u3002<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<p>\u53ef\u8aad\u6027\u306e\u89b3\u70b9\u304b\u3089\u306f\u3001\u76ee\u7684\u306b\u6700\u3082\u9069\u3057\u305f\u30e1\u30bd\u30c3\u30c9\u3092\u9078\u629e\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002<br>\u4f8b\u3048\u3070\u3001\u6587\u5b57\u5217\u30923\u3064\u306e\u90e8\u5206\u306b\u5206\u5272\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u3001<code>split<\/code>\u3092\u4f7f\u7528\u3059\u308b\u3088\u308a\u3082<code>partition<\/code>\u3092\u4f7f\u7528\u3059\u308b\u65b9\u304c\u610f\u56f3\u304c\u660e\u78ba\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">## partition\u3092\u4f7f\u7528\u3057\u305f\u4f8b\uff08\u53ef\u8aad\u6027\u304c\u9ad8\u3044\uff09\nname, _, domain = email.partition('@')\n\n## split\u3092\u4f7f\u7528\u3057\u305f\u4f8b\uff08\u540c\u3058\u7d50\u679c\u3060\u304c\u3001\u610f\u56f3\u304c\u4e0d\u660e\u78ba\uff09\nname, domain = email.split('@')<\/pre>\n\n\n\n<p>\u7d50\u8ad6\u3068\u3057\u3066\u3001\u5404\u30e1\u30bd\u30c3\u30c9\u306e\u7279\u6027\u3092\u7406\u89e3\u3057\u3001\u51e6\u7406\u306e\u76ee\u7684\u3084\u6271\u3046\u30c7\u30fc\u30bf\u306e\u7279\u6027\u306b\u5fdc\u3058\u3066\u9069\u5207\u306a\u30e1\u30bd\u30c3\u30c9\u3092\u9078\u629e\u3059\u308b\u3053\u3068\u304c\u3001\u52b9\u7387\u7684\u3067\u4fdd\u5b88\u6027\u306e\u9ad8\u3044\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u9375\u3068\u306a\u308a\u307e\u3059\u3002<br>\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u969b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3069\u306e\u3088\u3046\u306b\u6d3b\u7528\u3067\u304d\u308b\u304b\u3092\u3001\u5177\u4f53\u7684\u306a\u4f8b\u3092\u901a\u3058\u3066\u8a73\u3057\u304f\u898b\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-34\">5. \u5b9f\u969b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u306esplit\u30e1\u30bd\u30c3\u30c9\u6d3b\u7528\u4f8b<\/h3>\n\n\n\n<p><code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u5b9f\u969b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u69d8\u3005\u306a\u5834\u9762\u3067\u6d3b\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br>\u3053\u3053\u3067\u306f\u30013\u3064\u306e\u4ee3\u8868\u7684\u306a\u6d3b\u7528\u4f8b\u3092\u7d39\u4ecb\u3057\u3001\u305d\u308c\u305e\u308c\u306e\u554f\u984c\u8a2d\u5b9a\u3068\u89e3\u6c7a\u65b9\u6cd5\u3001\u5177\u4f53\u7684\u306a\u30b3\u30fc\u30c9\u4f8b\u3092\u898b\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-35\">CSV\u30d5\u30a1\u30a4\u30eb\u306e\u89e3\u6790\uff1a\u7c21\u5358\u306a\u8868\u8a08\u7b97\u51e6\u7406\u306e\u5b9f\u88c5<\/h4>\n\n\n\n<p><strong>\u554f\u984c\u8a2d\u5b9a<\/strong>: \u5927\u91cf\u306eCSV\u30c7\u30fc\u30bf\u3092\u52b9\u7387\u7684\u306b\u51e6\u7406\u3057\u3001\u7279\u5b9a\u306e\u5217\u306e\u5408\u8a08\u3092\u8a08\u7b97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u89e3\u6c7a\u65b9\u6cd5<\/strong>: <code>File.open<\/code>\u3068<code>each_line<\/code>\u3092\u4f7f\u7528\u3057\u3066\u30d5\u30a1\u30a4\u30eb\u30921\u884c\u305a\u3064\u8aad\u307f\u8fbc\u307f\u3001<code>split<\/code>\u3067\u5404\u5217\u306e\u30c7\u30fc\u30bf\u3092\u5206\u5272\u3057\u3066\u51e6\u7406\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def sum_column(file_path, column_index)\n  total = 0\n  File.open(file_path, 'r') do |file|\n    file.each_line do |line|\n      # \u30ab\u30f3\u30de\u3067\u5206\u5272\u3057\u3001\u6307\u5b9a\u3055\u308c\u305f\u5217\u306e\u5024\u3092\u6570\u5024\u306b\u5909\u63db\u3057\u3066\u5408\u8a08\u306b\u52a0\u7b97\n      total += line.split(',')[column_index].to_f\n    end\n  end\n  total\nend\n\n## \u4f7f\u7528\u4f8b\ntotal_sales = sum_column('sales_data.csv', 2)\nputs \"Total sales: #{total_sales}\"<\/pre>\n\n\n\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001<code>split(',')<\/code>\u3092\u4f7f\u3063\u3066CSV\u306e\u5404\u884c\u3092\u5217\u306b\u5206\u5272\u3057\u3066\u3044\u307e\u3059\u3002<br>\u5927\u898f\u6a21\u306a\u30d5\u30a1\u30a4\u30eb\u3067\u3082\u52b9\u7387\u7684\u306b\u51e6\u7406\u3067\u304d\u308b\u70b9\u304c\u7279\u5fb4\u3067\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-36\">\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u306e\u5206\u6790\uff1a\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u62bd\u51fa<\/h4>\n\n\n\n<p><strong>\u554f\u984c\u8a2d\u5b9a<\/strong>: \u5927\u898f\u6a21\u306a\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u7279\u5b9a\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u62bd\u51fa\u3057\u3001\u767a\u751f\u983b\u5ea6\u3092\u96c6\u8a08\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u89e3\u6c7a\u65b9\u6cd5<\/strong>: \u6b63\u898f\u8868\u73fe\u3068<code>split<\/code>\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u3001\u65e5\u4ed8\u3001\u30ed\u30b0\u30ec\u30d9\u30eb\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u5206\u96e2\u3057\u3001\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u62bd\u51fa\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def analyze_error_logs(log_file)\n  error_counts = Hash.new(0)\n\n  File.open(log_file, 'r') do |file|\n    file.each_line do |line|\n      # \u65e5\u4ed8\u3001\u30ed\u30b0\u30ec\u30d9\u30eb\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u5206\u5272\n      _, log_level, message = line.split(\/\\s+\/, 3)\n\n      if log_level == 'ERROR'\n        # \u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306e\u7a2e\u985e\u3092\u30ad\u30fc\u306b\u3057\u3066\u30ab\u30a6\u30f3\u30c8\n        error_type = message.split(':').first\n        error_counts[error_type] += 1\n      end\n    end\n  end\n\n  error_counts\nend\n\n## \u4f7f\u7528\u4f8b\nerror_analysis = analyze_error_logs('application.log')\nerror_analysis.each do |error_type, count|\n  puts \"#{error_type}: #{count} occurrences\"\nend<\/pre>\n\n\n\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001<code>split(\/\\s+\/, 3)<\/code>\u3092\u4f7f\u3063\u3066\u30ed\u30b0\u306e\u5404\u884c\u3092\u65e5\u4ed8\u3001\u30ed\u30b0\u30ec\u30d9\u30eb\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u5206\u5272\u3057\u3066\u3044\u307e\u3059\u3002<br>\u3055\u3089\u306b\u3001\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092<code>:<\/code>\u3067\u5206\u5272\u3057\u3066\u3001\u30a8\u30e9\u30fc\u306e\u7a2e\u985e\u3092\u62bd\u51fa\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-37\">\u81ea\u7136\u8a00\u8a9e\u51e6\u7406\uff1a\u6587\u7ae0\u306e\u5358\u8a9e\u5206\u5272\u3068\u983b\u51fa\u8a9e\u62bd\u51fa<\/h4>\n\n\n\n<p><strong>\u554f\u984c\u8a2d\u5b9a<\/strong>: \u9577\u3044\u6587\u7ae0\u304b\u3089\u983b\u51fa\u5358\u8a9e\u3092\u62bd\u51fa\u3057\u3001\u6587\u7ae0\u306e\u8981\u7d04\u3084\u7279\u5fb4\u5206\u6790\u3092\u884c\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u89e3\u6c7a\u65b9\u6cd5<\/strong>: <code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u3067\u6587\u7ae0\u3092\u5358\u8a9e\u306b\u5206\u5272\u3057\u3001\u30b0\u30eb\u30fc\u30d7\u5316\u3057\u3066\u983b\u5ea6\u3092\u30ab\u30a6\u30f3\u30c8\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def extract_frequent_words(text, top_n = 10)\n  # \u6587\u7ae0\u3092\u5c0f\u6587\u5b57\u306b\u5909\u63db\u3057\u3001\u5358\u8a9e\u306b\u5206\u5272\n  words = text.downcase.split(\/\\W+\/)\n\n  # \u5358\u8a9e\u306e\u51fa\u73fe\u56de\u6570\u3092\u30ab\u30a6\u30f3\u30c8\n  word_counts = words.group_by(&amp;:itself).transform_values(&amp;:count)\n\n  # \u51fa\u73fe\u56de\u6570\u3067\u30bd\u30fc\u30c8\u3057\u3001\u4e0a\u4f4dN\u500b\u3092\u62bd\u51fa\n  word_counts.sort_by { |_, count| -count }.first(top_n).to_h\nend\n\n## \u4f7f\u7528\u4f8b\ntext = \"Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.\"\nfrequent_words = extract_frequent_words(text)\nputs \"Most frequent words:\"\nfrequent_words.each { |word, count| puts \"#{word}: #{count}\" }<\/pre>\n\n\n\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001<code>split(\/\\W+\/)<\/code>\u3092\u4f7f\u3063\u3066\u6587\u7ae0\u3092\u5358\u8a9e\u306b\u5206\u5272\u3057\u3066\u3044\u307e\u3059\u3002<br>\u6b63\u898f\u8868\u73fe<code>\/\\W+\/<\/code>\u306f\u3001\u975e\u5358\u8a9e\u6587\u5b57\uff08\u30b9\u30da\u30fc\u30b9\u3084\u8a18\u53f7\u306a\u3069\uff09\u3092\u533a\u5207\u308a\u6587\u5b57\u3068\u3057\u3066\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-38\">split\u30e1\u30bd\u30c3\u30c9\u306e\u5229\u70b9\u3068\u6ce8\u610f\u70b9<\/h4>\n\n\n\n<div class=\"wp-block-sgb-message\"><div class=\"memo sng-shadow-0\" style=\"border-radius:0px;background-color:#b4e0fa;color:#009EF3\"><div class=\"memo_ttl dfont\"><span class=\"sng-box-msg__icon\" style=\"background:#009EF3\"><i class=\"far fa-thumbs-up\"><\/i><\/span><div class=\"sng-box-msg__title\">\u30e1\u30ea\u30c3\u30c8<\/div><\/div><div class=\"sng-box-msg__contents\">\n<ul class=\"wp-block-list\">\n<li>\u30b7\u30f3\u30d7\u30eb\u3067\u76f4\u611f\u7684\u306a\u4f7f\u3044\u65b9<\/li>\n\n\n\n<li>\u6b63\u898f\u8868\u73fe\u3068\u306e\u7d44\u307f\u5408\u308f\u305b\u306b\u3088\u308b\u67d4\u8edf\u306a\u5206\u5272<\/li>\n\n\n\n<li>\u5927\u898f\u6a21\u30c7\u30fc\u30bf\u306e\u52b9\u7387\u7684\u306a\u51e6\u7406\u304c\u53ef\u80fd<\/li>\n<\/ul>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-sgb-message\"><div class=\"memo sng-shadow-0\" style=\"border-radius:0px;background-color:#ffebeb;color:#f88080\"><div class=\"memo_ttl dfont\"><span class=\"sng-box-msg__icon\" style=\"background:#f88080\"><i class=\"fas fa-exclamation\"><\/i><\/span><div class=\"sng-box-msg__title\">\u6ce8\u610f\u70b9<\/div><\/div><div class=\"sng-box-msg__contents\">\n<ul class=\"wp-block-list\">\n<li>\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u4e00\u5ea6\u306b\u51e6\u7406\u3059\u308b\u969b\u306e\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u306b\u6ce8\u610f\u304c\u5fc5\u8981<\/li>\n\n\n\n<li>\u8907\u96d1\u306a\u6b63\u898f\u8868\u73fe\u4f7f\u7528\u6642\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u4f4e\u4e0b\u306b\u6c17\u3092\u3064\u3051\u308b<\/li>\n\n\n\n<li>\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306e\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u305f\u3081\u3001\u9069\u5207\u306b\u51e6\u7406\u3059\u308b<\/li>\n<\/ul>\n<\/div><\/div><\/div>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u6d3b\u7528\u4f8b\u3092\u53c2\u8003\u306b\u3001\u81ea\u8eab\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3082<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u52b9\u679c\u7684\u306b\u6d3b\u7528\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<br>\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u969b\u306e\u6ce8\u610f\u70b9\u3068\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306b\u3064\u3044\u3066\u8a73\u3057\u304f\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-39\">6. split\u30e1\u30bd\u30c3\u30c9\u306e\u6ce8\u610f\u70b9\u3068\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9<\/h3>\n\n\n\n<p><code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306f\u975e\u5e38\u306b\u4fbf\u5229\u3067\u3059\u304c\u3001\u9069\u5207\u306b\u4f7f\u7528\u3057\u306a\u3044\u3068\u4e88\u671f\u305b\u306c\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<br>\u3053\u3053\u3067\u306f\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u969b\u306e\u4e3b\u8981\u306a\u6ce8\u610f\u70b9\u3068\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-40\">\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306e\u554f\u984c\u3068\u5bfe\u51e6\u6cd5<\/h4>\n\n\n\n<p>\u7570\u306a\u308b\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306e\u6587\u5b57\u5217\u3092\u51e6\u7406\u3059\u308b\u969b\u306b\u3001\u6587\u5b57\u5316\u3051\u3084\u4f8b\u5916\u304c\u767a\u751f\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<br>\u3053\u308c\u3092\u9632\u3050\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u306e\u5bfe\u7b56\u3092\u8b1b\u3058\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-41\">1. <strong>\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306e\u7d71\u4e00<\/strong><\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   text = text.encode('UTF-8', invalid: :replace, undef: :replace, replace: '?')<\/pre>\n\n\n\n<p>\u3053\u306e\u65b9\u6cd5\u3067\u306f\u3001\u7121\u52b9\u306a\u6587\u5b57\u3084\u672a\u5b9a\u7fa9\u306e\u6587\u5b57\u3092\u2019?\u2019\u306b\u7f6e\u304d\u63db\u3048\u3066\u3001\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092 UTF-8 \u306b\u7d71\u4e00\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-42\">2. <strong>\u6b63\u3057\u3044\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f<\/strong><\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   File.open('file.txt', 'r:UTF-8') do |file|\n     # \u30d5\u30a1\u30a4\u30eb\u51e6\u7406\n   end<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-43\">3. <strong>\u30de\u30eb\u30c1\u30d0\u30a4\u30c8\u6587\u5b57\u3092\u8003\u616e\u3057\u305f\u6b63\u898f\u8868\u73fe\u306e\u4f7f\u7528<\/strong><\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   text.split(\/[[:space:]]+\/)  # Unicode\u5bfe\u5fdc\u306e\u7a7a\u767d\u6587\u5b57\u3067\u306e\u5206\u5272<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-44\">\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u6ce8\u610f\u70b9\uff1a\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u306e\u6271\u3044\u65b9<\/h4>\n\n\n\n<p>\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u3092 <code>split<\/code> \u30e1\u30bd\u30c3\u30c9\u3067\u51e6\u7406\u3059\u308b\u969b\u306f\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306b\u5341\u5206\u6ce8\u610f\u3092\u6255\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-45\">1. <strong>\u5165\u529b\u5024\u306e\u30b5\u30cb\u30bf\u30a4\u30ba<\/strong><\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   safe_input = input.gsub(\/[^a-zA-Z0-9,]\/, '')\n   parts = safe_input.split(',')<\/pre>\n\n\n\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001\u82f1\u6570\u5b57\u3068\u30ab\u30f3\u30de\u4ee5\u5916\u306e\u6587\u5b57\u3092\u9664\u53bb\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-46\">2. <strong>\u6b63\u898f\u8868\u73fe\u306e\u9069\u5207\u306a\u4f7f\u7528<\/strong><\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   # \u5371\u967a\u306a\u4f8b\n   Regexp.new(user_input)\n\n   # \u5b89\u5168\u306a\u4f8b\n   Regexp.escape(user_input)<\/pre>\n\n\n\n<p>\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u3092\u76f4\u63a5\u6b63\u898f\u8868\u73fe\u306b\u4f7f\u7528\u3059\u308b\u3053\u3068\u306f\u907f\u3051\u3001\u5fc5\u305a <code>Regexp.escape<\/code> \u3092\u4f7f\u7528\u3057\u3066\u30a8\u30b9\u30b1\u30fc\u30d7\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-47\">3. <strong>SQL \u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u306e\u9632\u6b62<\/strong><\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   # \u5371\u967a\u306a\u4f8b\n   query = \"SELECT * FROM users WHERE name = '#{name.split.first}'\"\n\n   # \u5b89\u5168\u306a\u4f8b\n   query = \"SELECT * FROM users WHERE name = ?\"\n   ActiveRecord::Base.connection.execute(query, name.split.first)<\/pre>\n\n\n\n<p>\u30d7\u30ec\u30fc\u30b9\u30db\u30eb\u30c0\u3092\u4f7f\u7528\u3057\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u5316\u3055\u308c\u305f\u30af\u30a8\u30ea\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001SQL \u30a4\u30f3\u30b8\u30a7\u30af\u30b7\u30e7\u30f3\u3092\u9632\u3050\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-48\">\u53ef\u8aad\u6027\u3068\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u6027\u3092\u9ad8\u3081\u308b\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u65b9\u6cd5<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-49\">1. <strong>\u9069\u5207\u306a\u5909\u6570\u540d\u3068\u30b3\u30e1\u30f3\u30c8\u306e\u4f7f\u7528<\/strong><\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   # CSV\u306e\u5404\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u5206\u5272\n   fields = line.split(',')\n   name = fields[0]  # \u540d\u524d\u306f\u6700\u521d\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\n   age = fields[1]   # \u5e74\u9f62\u306f2\u756a\u76ee\u306e\u30d5\u30a3\u30fc\u30eb\u30c9<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-50\">2. <strong>\u8907\u96d1\u306a\u6b63\u898f\u8868\u73fe\u306e\u8aac\u660e\u3092\u6dfb\u3048\u308b<\/strong><\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   # \u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u30e6\u30fc\u30b6\u30fc\u540d\u3068\u30c9\u30e1\u30a4\u30f3\u306b\u5206\u5272\n   username, domain = email.split(\/@\/)<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-51\">3. <strong>\u30e1\u30bd\u30c3\u30c9\u306e\u5206\u5272\u3068\u518d\u5229\u7528<\/strong><\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   def parse_csv_line(line)\n     line.split(',').map(&amp;:strip)\n   end\n\n   data = csv_content.lines.map { |line| parse_csv_line(line) }<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"i-52\">4. <strong>\u5b9a\u6570\u306e\u4f7f\u7528<\/strong><\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">   FIELD_SEPARATOR = ','\n   MAX_FIELDS = 5\n\n   fields = line.split(FIELD_SEPARATOR, MAX_FIELDS)<\/pre>\n\n\n\n<div class=\"wp-block-sgb-block-simple sgb-box-simple sgb-box-simple--title-normal sgb-box-simple--with-border\"><div style=\"background-color:var(--wp--preset--color--sango-main);color:#FFF\" class=\"sgb-box-simple__title\">\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306b\u95a2\u3059\u308b3\u3064\u306e\u6ce8\u610f\u70b9<\/div><div class=\"sgb-box-simple__body\" style=\"border-color:var(--wp--preset--color--sango-main);background-color:#FFF\">\n<ol class=\"wp-block-list\">\n<li>\u5927\u91cf\u30c7\u30fc\u30bf\u51e6\u7406\u6642\u306f\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u306b\u6ce8\u610f\u3057\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u4e00\u884c\u305a\u3064\u51e6\u7406\u3059\u308b\u306a\u3069\u306e\u5de5\u592b\u3092\u3057\u307e\u3057\u3087\u3046\u3002<\/li>\n\n\n\n<li>\u8907\u96d1\u306a\u6b63\u898f\u8868\u73fe\u306e\u4f7f\u7528\u306f\u6700\u5c0f\u9650\u306b\u6291\u3048\u3001\u30b7\u30f3\u30d7\u30eb\u306a\u6587\u5b57\u5217\u3067\u306e\u5206\u5272\u3092\u512a\u5148\u3057\u307e\u3057\u3087\u3046\u3002<\/li>\n\n\n\n<li>\u5fc5\u8981\u4ee5\u4e0a\u306e\u5206\u5272\u3092\u907f\u3051\u3001\u5fc5\u8981\u306a\u90e8\u5206\u306e\u307f\u3092\u5206\u5272\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/li>\n<\/ol>\n<\/div><\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-53\">\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8<\/h4>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306e\u4f7f\u7528\u3092\u6700\u9069\u5316\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<div class=\"wp-block-sgb-message\"><div class=\"memo sng-shadow-0\" style=\"border-radius:0px;background-color:#fff9e6;color:#ffb36b\"><div class=\"memo_ttl dfont\"><span class=\"sng-box-msg__icon\" style=\"background:#ffb36b\"><i class=\"fas fa-pencil-alt\"><\/i><\/span><div class=\"sng-box-msg__title\">\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u30c1\u30a7\u30c3\u30af\u30ea\u30b9\u30c8<\/div><\/div><div class=\"sng-box-msg__contents\">\n<ul class=\"wp-block-list\">\n<li>\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u7d71\u4e00\u3057\u3066\u3044\u307e\u3059\u304b\uff1f<\/li>\n\n\n\n<li>\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u3092\u9069\u5207\u306b\u30b5\u30cb\u30bf\u30a4\u30ba\u3057\u3066\u3044\u307e\u3059\u304b\uff1f<\/li>\n\n\n\n<li>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u8003\u616e\u3057\u3066\u3044\u307e\u3059\u304b\uff1f<\/li>\n\n\n\n<li>\u30a8\u30c3\u30b8\u30b1\u30fc\u30b9\uff08\u7a7a\u6587\u5b57\u5217\u3001\u4e88\u671f\u3057\u306a\u3044\u5165\u529b\u306a\u3069\uff09\u3092\u30c6\u30b9\u30c8\u3057\u3066\u3044\u307e\u3059\u304b\uff1f<\/li>\n\n\n\n<li>\u30b3\u30fc\u30c9\u306e\u53ef\u8aad\u6027\u3092\u78ba\u8a8d\u3057\u307e\u3057\u305f\u304b\uff1f<\/li>\n\n\n\n<li>\u9069\u5207\u306a\u5358\u4f53\u30c6\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u304b\uff1f<\/li>\n\n\n\n<li>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u306f\u5341\u5206\u3067\u3059\u304b\uff1f<\/li>\n<\/ul>\n<\/div><\/div><\/div>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u6ce8\u610f\u70b9\u3068\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u3092\u610f\u8b58\u3059\u308b\u3053\u3068\u3067\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u3088\u308a\u5b89\u5168\u304b\u3064\u52b9\u679c\u7684\u306b\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<br>\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u3053\u308c\u307e\u3067\u306b\u5b66\u3093\u3060\u5185\u5bb9\u3092\u7dcf\u62ec\u3057\u3001\u3055\u3089\u306a\u308b\u5b66\u7fd2\u30ea\u30bd\u30fc\u30b9\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"i-54\">7. \u307e\u3068\u3081\uff1aRuby\u306esplit\u30e1\u30bd\u30c3\u30c9\u30de\u30b9\u30bf\u30fc\u3078\u306e\u9053<\/h3>\n\n\n\n<p>\u672c\u8a18\u4e8b\u3067\u306f\u3001Ruby\u306e<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306b\u3064\u3044\u3066\u3001\u57fa\u672c\u304b\u3089\u5fdc\u7528\u307e\u3067\u5e45\u5e83\u304f\u89e3\u8aac\u3057\u3066\u304d\u307e\u3057\u305f\u3002<br>\u3053\u3053\u3067\u3001\u5b66\u3093\u3060\u5185\u5bb9\u3092\u632f\u308a\u8fd4\u308a\u3001\u4eca\u5f8c\u306e\u5b66\u7fd2\u306e\u6307\u91dd\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-55\">\u5b66\u3093\u30607\u3064\u306e\u30c6\u30af\u30cb\u30c3\u30af\u306e\u5fa9\u7fd2<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u3063\u305f\u9ad8\u5ea6\u306a\u5206\u5272<\/li>\n\n\n\n<li>\u9650\u5b9a\u5206\u5272\u3067\u914d\u5217\u306e\u8981\u7d20\u6570\u3092\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb<\/li>\n\n\n\n<li>\u9023\u7d9a\u3057\u305f\u533a\u5207\u308a\u6587\u5b57\u306e\u51e6\u7406<\/li>\n\n\n\n<li>\u5148\u982d\u3068\u672b\u5c3e\u306e\u7a7a\u767d\u3092\u7121\u8996\u3059\u308b\u65b9\u6cd5<\/li>\n\n\n\n<li>\u8907\u6570\u306e\u533a\u5207\u308a\u6587\u5b57\u3092\u4f7f\u7528\u3057\u305f\u5206\u5272<\/li>\n\n\n\n<li>\u30d6\u30ed\u30c3\u30af\u3092\u4f7f\u3063\u305f\u52d5\u7684\u306a\u5206\u5272\u51e6\u7406<\/li>\n\n\n\n<li>\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3057\u306a\u3044\u5206\u5272<\/li>\n<\/ol>\n\n\n\n<p>\u3053\u308c\u3089\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u99c6\u4f7f\u3059\u308b\u3053\u3068\u3067\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306e\u771f\u306e\u529b\u3092\u5f15\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-56\">split\u30e1\u30bd\u30c3\u30c9\u306e\u7121\u9650\u306e\u53ef\u80fd\u6027<\/h4>\n\n\n\n<p><code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u5358\u306a\u308b\u6587\u5b57\u5217\u5206\u5272\u30c4\u30fc\u30eb\u3092\u8d85\u3048\u3066\u3001\u30c6\u30ad\u30b9\u30c8\u89e3\u6790\u3001\u30c7\u30fc\u30bf\u51e6\u7406\u3001\u81ea\u7136\u8a00\u8a9e\u51e6\u7406\u3001\u30ed\u30b0\u5206\u6790\u3001\u30d5\u30a1\u30a4\u30eb\u30d1\u30fc\u30b9\u306a\u3069\u3001\u5e45\u5e83\u3044\u5fdc\u7528\u304c\u53ef\u80fd\u3067\u3059\u3002<br>\u305d\u306e\u6f5c\u5728\u7684\u306a\u53ef\u80fd\u6027\u306f\u3001\u3042\u306a\u305f\u306e\u5275\u9020\u529b\u6b21\u7b2c\u3067\u7121\u9650\u306b\u5e83\u304c\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-57\">\u6b21\u306e\u30b9\u30c6\u30c3\u30d7<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5b66\u3093\u3060\u30c6\u30af\u30cb\u30c3\u30af\u3092\u81ea\u8eab\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u7a4d\u6975\u7684\u306b\u9069\u7528\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/li>\n\n\n\n<li>\u3088\u308a\u8907\u96d1\u306a\u6587\u5b57\u5217\u64cd\u4f5c\u306e\u8ab2\u984c\u306b\u6311\u6226\u3057\u3001\u30b9\u30ad\u30eb\u3092\u78e8\u3044\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/li>\n\n\n\n<li>\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3068\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u5e38\u306b\u610f\u8b58\u3057\u3001\u30b3\u30fc\u30c9\u306e\u6700\u9069\u5316\u3092\u5fc3\u304c\u3051\u307e\u3057\u3087\u3046\u3002<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"i-58\">\u3055\u3089\u306a\u308b\u5b66\u7fd2\u306e\u305f\u3081\u306e\u30ea\u30bd\u30fc\u30b9<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ruby\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\uff1a\u6700\u65b0\u306e<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306e\u4ed5\u69d8\u3084\u95a2\u9023\u30e1\u30bd\u30c3\u30c9\u306b\u3064\u3044\u3066\u5b66\u3079\u307e\u3059\u3002<\/li>\n\n\n\n<li>Advanced Ruby Programming\u66f8\u7c4d\uff1a\u3088\u308a\u9ad8\u5ea6\u306a\u6587\u5b57\u5217\u51e6\u7406\u30c6\u30af\u30cb\u30c3\u30af\u3092\u5b66\u3076\u306e\u306b\u6700\u9069\u3067\u3059\u3002<\/li>\n\n\n\n<li>\u30aa\u30f3\u30e9\u30a4\u30f3Ruby\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3084\u30d5\u30a9\u30fc\u30e9\u30e0\uff1a\u4ed6\u306e\u958b\u767a\u8005\u3068\u77e5\u8b58\u3092\u5171\u6709\u3057\u3001\u5b9f\u8df5\u7684\u306a\u30a2\u30c9\u30d0\u30a4\u30b9\u3092\u5f97\u3089\u308c\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u6587\u5b57\u5217\u51e6\u7406\u306b\u7279\u5316\u3057\u305fRuby gem\uff1a\u3088\u308a\u9ad8\u5ea6\u306a\u6587\u5b57\u5217\u64cd\u4f5c\u306e\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3092\u63a2\u7d22\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/li>\n<\/ul>\n\n\n\n<p><code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u306f\u3001Ruby\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u57fa\u672c\u3067\u3042\u308a\u306a\u304c\u3089\u3001\u7fd2\u5f97\u3059\u308c\u3070\u3059\u308b\u307b\u3069\u5965\u6df1\u3055\u3092\u611f\u3058\u308b\u30c4\u30fc\u30eb\u3067\u3059\u3002<br>\u3053\u306e\u8a18\u4e8b\u3067\u5b66\u3093\u3060\u5185\u5bb9\u3092\u57fa\u306b\u3001\u5b9f\u969b\u306e\u30b3\u30fc\u30c9\u3067\u5b9f\u8df5\u3057\u3001\u3055\u3089\u306a\u308b\u63a2\u6c42\u3092\u7d9a\u3051\u3066\u304f\u3060\u3055\u3044\u3002<br>\u6587\u5b57\u5217\u64cd\u4f5c\u306e\u30de\u30b9\u30bf\u30fc\u306b\u306a\u308b\u9053\u306e\u308a\u306f\u3001\u3053\u3053\u304b\u3089\u3055\u3089\u306b\u5e83\u304c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>Ruby\u306e\u4e16\u754c\u3067\u3001<code>split<\/code>\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\u3053\u306a\u3059\u7686\u3055\u3093\u306e\u6d3b\u8e8d\u3092\u697d\u3057\u307f\u306b\u3057\u3066\u3044\u307e\u3059\u3002<br>Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ruby\u306esplit\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u6587\u5b57\u5217\u64cd\u4f5c\u306e\u8981\u3068\u306a\u308b\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3067\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u521d\u5fc3\u8005\u304b\u3089\u4e0a\u7d1a\u8005\u307e\u3067\u3001\u3042\u3089\u3086\u308bRuby\u958b\u767a\u8005\u304csplit\u30e1\u30bd\u30c3\u30c9\u3092\u5b8c\u5168\u306b\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306e\u77e5\u8b58\u3068\u30c6\u30af\u30cb\u30c3\u30af\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u304b\u3089 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":3086,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,65],"tags":[],"class_list":{"0":"post-144","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-ruby","8":"category-ruby-syntax"},"_links":{"self":[{"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/posts\/144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=144"}],"version-history":[{"count":2,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/posts\/144\/revisions"}],"predecessor-version":[{"id":146,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/posts\/144\/revisions\/146"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=\/wp\/v2\/media\/3086"}],"wp:attachment":[{"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dexall.co.jp\/articles\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}