﻿{"id":3491,"date":"2013-08-02T19:32:32","date_gmt":"2013-08-02T10:32:32","guid":{"rendered":"http:\/\/fujiitoshiki.com\/improvesociety\/?p=3491"},"modified":"2017-04-27T15:28:03","modified_gmt":"2017-04-27T06:28:03","slug":"post-3491","status":"publish","type":"post","link":"https:\/\/www.fujiitoshiki.com\/improvesociety\/?p=3491","title":{"rendered":"VBScript\u306e\u6b63\u898f\u8868\u73fe\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u306b\u534a\u89d2\u82f1\u6570\u5b57\u3068\u534a\u89d2\u8a18\u53f7\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u304b\u691c\u8a3c\u3059\u308b"},"content":{"rendered":"<div class=\"theContentWrap-ccc\"><p>\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u8a2d\u5b9a\u306e\u969b\u306b\u534a\u89d2\u6570\u5b57\uff0c\u534a\u89d2\u82f1\u5b57\uff0c\u534a\u89d2\u8a18\u53f7\u3092\u305d\u308c\u305e\u308c\u6700\u4f4e\u3067\u3082 1 \u6587\u5b57\u4f7f\u7528\u3059\u308b\u3088\u3046\u6c42\u3081\u3089\u308c\u308b\u30b1\u30fc\u30b9\u306f\u591a\u3044\u3068\u601d\u3044\u307e\u3059\uff0e\u4eca\u56de\u306f VBScript \u306e\u6b63\u898f\u8868\u73fe\u3092\u7528\u3044\u3066\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\uff0e<\/p>\n<p>\u3000\u5236\u7d04\u6761\u4ef6\u3092\u534a\u89d2\u82f1\u6570\u5b57\uff0c\u534a\u89d2\u8a18\u53f7\u3092\u6700\u4f4e\u3067\u3082 1 \u6587\u5b57\u7528\u3044\u308b\u3053\u3068\u3068\u3057\uff0c\u6587\u5b57\u5217\u9577\u3092 8 \u6587\u5b57\u4ee5\u4e0a\u3068\u3057\u307e\u3059\uff0e\u4e0b\u56f3\u306e\u3088\u3046\u306b\u30e6\u30fc\u30b6\u30fc\u30d5\u30a9\u30fc\u30e0\u4e0a\u306b\u30e9\u30d9\u30eb\u3068\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u3068\u30b3\u30de\u30f3\u30c9\u30dc\u30bf\u30f3\u3092\u914d\u7f6e\u3057\u307e\u3059\uff0e\u305d\u308c\u305e\u308c Label1, TextBox1, CommandButton1 \u3068\u3057\u307e\u3059\uff0e<\/p>\n<p><a href=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/EnterPassword.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/EnterPassword-300x106.png\" alt=\"EnterPassword\" width=\"300\" height=\"106\" class=\"alignnone size-medium wp-image-3585\" srcset=\"https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/EnterPassword-300x106.png 300w, https:\/\/www.fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/EnterPassword.png 330w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<p>\u3000\u4e0b\u8a18\u30b3\u30fc\u30c9\u306e 23 \u884c\u76ee\u3067\u5236\u7d04\u6761\u4ef6\u3092\u8868\u73fe\u3057\u307e\u3059\uff0e\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u305f 22 \u884c\u76ee\u306f\u534a\u89d2\u82f1\u6570\u5b57\u306e\u307f\u3092 8 \u6587\u5b57\u4ee5\u4e0a\u7528\u3044\u308b\u5834\u5408\u306e\u6b63\u898f\u8868\u73fe\u3067\u3059\uff0e\u6587\u5b57\u30af\u30e9\u30b9\u5185\u3067\u30a8\u30b9\u30b1\u30fc\u30d7\u304c\u5fc5\u8981\u306a\u30e1\u30bf\u6587\u5b57\u306f \\ \u3068 ] \u306e 2 \u7a2e\u985e\u3067\u3059\uff0e<\/p>\n<pre class=\"toolbar-overlay:true lang:vb decode:true\">Option Explicit\r\n\r\nPrivate Sub CommandButton1_Click()\r\n    With TextBox1\r\n        If Not CheckPassword(.Text) Then\r\n            .SetFocus\r\n            .SelStart = 0\r\n            .SelLength = Len(.Text)\r\n            Exit Sub\r\n        Else\r\n            \r\n        End If\r\n    End With\r\n    Unload Me\r\nEnd Sub\r\n\r\nFunction CheckPassword(InputString As String) As Boolean\r\n    Dim myReg   As Object\r\n    CheckPassword = False\r\n    Set myReg = CreateObject(\"VBScript.RegExp\")\r\n    With myReg\r\n       '.Pattern = \"(?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{8,})$\"\r\n        .Pattern = \"(?!^[0-9]*$)(?!^[a-zA-Z]*$)(?!^[!-\/:-@[-`{-~]*$)(?!^[a-zA-Z0-9]*$)(?!^[!-@[-`{-~]*$)(?!^[!-\/:-~]*$)^([!-~]{8,})$\"\r\n        .IgnoreCase = False\r\n        .Global = True\r\n    End With\r\n    If myReg.Test(InputString) Then\r\n        CheckPassword = True\r\n    End If\r\n    Set myReg = Nothing\r\nEnd Function\r\n\r\nPrivate Sub UserForm_Initialize()\r\n    With TextBox1\r\n        .IMEMode = fmIMEModeDisable\r\n        .PasswordChar = \"*\"\r\n    End With\r\nEnd Sub\r\n<\/pre>\n<p>\u3000\u3053\u3053\u3067\u89e3\u8aac\u304c\u5fc5\u8981\u304b\u3068\u601d\u3044\u307e\u3059\uff0e(?!<em>pattern<\/em>) \u306f\u5426\u5b9a\u5148\u8aad\u307f\u3092\u793a\u3057\uff0cSQL \u3067\u8a00\u3046\u3068\u3053\u308d\u306e EXCEPT \u6f14\u7b97\u5b50\u3068\u540c\u3058\u50cd\u304d\u3092\u3057\u307e\u3059\uff0e\u534a\u89d2\u82f1\u6570\u5b57\u3068\u534a\u89d2\u8a18\u53f7\u3092\u6700\u4f4e\u3067\u3082 1 \u6587\u5b57\u4ee5\u4e0a\u4f7f\u7528\u3059\u308b\u3068\u306f\uff0c\u4e0b\u8868\u306e\u6587\u5b57\u306e\u7d44\u307f\u5408\u308f\u305b\u3092\u8a31\u53ef\u3057\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u3067\u3059\uff0e\u4e0b\u56f3\u306e 3 \u3064\u306e\u5186\u306e\u91cd\u306a\u308b\u9818\u57df\u3092\u6c42\u3081\u308b\u306b\u306f\uff0c\u305d\u306e\u5468\u8fba\u306e\u9818\u57df\u3092\u5f15\u304d\u7b97\u3057\u3066\u6c42\u3081\u307e\u3059\uff0e\u8a31\u53ef\u3057\u306a\u3044\u30d1\u30bf\u30fc\u30f3\u3092\u5426\u5b9a\u5148\u8aad\u307f\u3067\u4e88\u3081\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3057\u3066\u304a\u304d\uff0c\u6700\u5f8c\u306b\u5168\u7a2e\u985e\u306e\u6587\u5b57\u30af\u30e9\u30b9\u306e\u6587\u5b57\u5217\u9577\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u3044\u307e\u3059\uff0e\u96c6\u5408\u8ad6\u3068\u3082\u8003\u3048\u65b9\u306e\u91cd\u306a\u308b\u9818\u57df\u3067\u3059\uff0e\u3061\u306a\u307f\u306b\uff0cn \u7a2e\u985e\u306e\u6587\u5b57\u7a2e\u3092\u691c\u8a3c\u3059\u308b\u306e\u306b\u5fc5\u8981\u306a\u5426\u5b9a\u5148\u8aad\u307f\u306e\u30d1\u30bf\u30fc\u30f3\u6570\u306f 2<sup>n<\/sup> &#8211; 2 \u3067\u3059\uff0e<\/p>\n<table border=\"0\" align=\"left\">\n<tbody>\n<tr style=\"background-color: #a9a9a9;\">\n<td><span style=\"color: #ffffff; font-family: georgia, palatino;\">Not Needed<\/span><\/td>\n<td><span style=\"color: #ffffff; font-family: georgia, palatino;\">Negative Lookahead Pattern<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-family: georgia, palatino;\">Number<\/span><\/td>\n<td><span style=\"font-family: georgia, palatino;\">(?!^[0-9]*$)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-family: georgia, palatino;\">Character<\/span><\/td>\n<td><span style=\"font-family: georgia, palatino;\">(?!^[a-zA-Z]*$)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-family: georgia, palatino;\">Symbol<\/span><\/td>\n<td><span style=\"font-family: georgia, palatino;\">(?!^[!-\/:-@[-&#096;{-~]*$)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-family: georgia, palatino;\">Character and number<\/span><\/td>\n<td><span style=\"font-family: georgia, palatino;\">(?!^[a-zA-Z0-9]*$)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-family: georgia, palatino;\">Number and symbol<\/span><\/td>\n<td><span style=\"font-family: georgia, palatino;\">(?!^[!-@[-`{-~]*$)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-family: georgia, palatino;\">Character and symbol<\/span><\/td>\n<td><span style=\"font-family: georgia, palatino;\">(?!^[!-\/:-~]*$)<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a href=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/PasswordValidation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3536\" alt=\"PasswordValidation\" src=\"\/\/fujiitoshiki.com\/improvesociety\/wp-content\/uploads\/PasswordValidation.png\" width=\"208\" height=\"204\" \/><\/a><\/p>\n<p>\u53c2\u7167\uff1a<br \/>\n<a title=\"ASP.NET \u3078\u306e\u5165\u529b\u3092\u5236\u7d04\u3059\u308b\u305f\u3081\u306b\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\" href=\"\/\/msdn.microsoft.com\/ja-jp\/library\/ff650303.aspx\" target=\"_blank\">ASP.NET \u3078\u306e\u5165\u529b\u3092\u5236\u7d04\u3059\u308b\u305f\u3081\u306b\u6b63\u898f\u8868\u73fe\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5<\/a><br \/>\n<a title=\"\u6b63\u898f\u8868\u73fe\u306e\u69cb\u6587\" href=\"\/\/msdn.microsoft.com\/ja-jp\/library\/cc392020.aspx\" target=\"_blank\">\u6b63\u898f\u8868\u73fe\u306e\u69cb\u6587<\/a><br \/>\n<a href=\"\/\/fujiitoshiki.com\/improvesociety\/?p=3469\" target=\"_blank\">ASCII\u6587\u5b57\u30b3\u30fc\u30c9(0-127)\u4e00\u89a7\u8868<\/a><br \/>\n<a href=\"\/\/fujiitoshiki.com\/improvesociety\/?p=3063\" target=\"_blank\">\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3068\u3057\u3066\u306eEXCEL VBA\u306b\u3088\u308b\u30e6\u30fc\u30b6\u30fc\u30d5\u30a9\u30fc\u30e0<\/a><\/p>\n<p><iframe src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=fujiitoshiki-22&#038;o=9&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=ss_til&#038;asins=4873113598\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><iframe src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=fujiitoshiki-22&#038;o=9&#038;p=8&#038;l=as4&#038;m=amazon&#038;f=ifr&#038;ref=ss_til&#038;asins=479736761X\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u8a2d\u5b9a\u306e\u969b\u306b\u534a\u89d2\u6570\u5b57\uff0c\u534a\u89d2\u82f1\u5b57\uff0c\u534a\u89d2\u8a18\u53f7\u3092\u305d\u308c\u305e\u308c\u6700\u4f4e\u3067\u3082 1 \u6587\u5b57\u4f7f\u7528\u3059\u308b\u3088\u3046\u6c42\u3081\u3089\u308c\u308b\u30b1\u30fc\u30b9\u306f\u591a\u3044\u3068\u601d\u3044\u307e\u3059\uff0e\u4eca\u56de\u306f VBScript \u306e\u6b63\u898f\u8868\u73fe\u3092\u7528\u3044\u3066\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\uff0e \u3000\u5236\u7d04\u6761 &hellip; <a href=\"https:\/\/www.fujiitoshiki.com\/improvesociety\/?p=3491\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;VBScript\u306e\u6b63\u898f\u8868\u73fe\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u306b\u534a\u89d2\u82f1\u6570\u5b57\u3068\u534a\u89d2\u8a18\u53f7\u304c\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b\u304b\u691c\u8a3c\u3059\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":3536,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[6],"tags":[342,603,153,336,339,347,334,338,340,346,344,345,341,337,343,335],"class_list":["post-3491","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel","tag-342","tag-excel","tag-vba","tag-vbscript","tag-339","tag-347","tag-334","tag-338","tag-340","tag-346","tag-344","tag-345","tag-341","tag-337","tag-343","tag-335"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/posts\/3491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3491"}],"version-history":[{"count":68,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/posts\/3491\/revisions"}],"predecessor-version":[{"id":8138,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/posts\/3491\/revisions\/8138"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/media\/3536"}],"wp:attachment":[{"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}