<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://hmoegirl.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ABilibiliVideoIDValidator</id>
	<title>Module:BilibiliVideoIDValidator - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://hmoegirl.com/index.php?action=history&amp;feed=atom&amp;title=Module%3ABilibiliVideoIDValidator"/>
	<link rel="alternate" type="text/html" href="https://hmoegirl.com/index.php?title=Module:BilibiliVideoIDValidator&amp;action=history"/>
	<updated>2026-08-22T04:49:58Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://hmoegirl.com/index.php?title=Module:BilibiliVideoIDValidator&amp;diff=60173&amp;oldid=prev</id>
		<title>imported&gt;=海豚=：​创建页面，内容为“return {     validation = function(frame)         local result = true         local id = mw.text.trim(frame.args.id or &#039;&#039;)         if mw.ustring.match(id, &#039;^%d+$&#039;) t…”</title>
		<link rel="alternate" type="text/html" href="https://hmoegirl.com/index.php?title=Module:BilibiliVideoIDValidator&amp;diff=60173&amp;oldid=prev"/>
		<updated>2021-01-19T03:05:02Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“return {     validation = function(frame)         local result = true         local id = mw.text.trim(frame.args.id or &amp;#039;&amp;#039;)         if mw.ustring.match(id, &amp;#039;^%d+$&amp;#039;) t…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;return {&lt;br /&gt;
    validation = function(frame)&lt;br /&gt;
        local result = true&lt;br /&gt;
        local id = mw.text.trim(frame.args.id or &amp;#039;&amp;#039;)&lt;br /&gt;
        if mw.ustring.match(id, &amp;#039;^%d+$&amp;#039;) then&lt;br /&gt;
            -- 纯数字&lt;br /&gt;
            if not (string.sub(id, 1, 1) ~= &amp;#039;0&amp;#039; and string.len(id) &amp;lt;= 9) then -- 若id为纯数字时，当首位不为0且长度在1-9位时合法。&lt;br /&gt;
                result = false&lt;br /&gt;
            end&lt;br /&gt;
        elseif mw.ustring.match(id, &amp;#039;^[aA][vV]%d+$&amp;#039;) then&lt;br /&gt;
            -- 若id为【av+纯数字】（不区分大小写）时，当且仅当纯数字部分首位不为0且长度在1-9位时合法，其余情况添加分类&lt;br /&gt;
            if not (string.sub(id, 3, 3) ~= &amp;#039;0&amp;#039; and string.len(id) &amp;lt;= 11) then&lt;br /&gt;
                result = false&lt;br /&gt;
            end&lt;br /&gt;
        elseif mw.ustring.match(id, &amp;#039;4.1.7..$&amp;#039;) then&lt;br /&gt;
            if string.len(id) == 12 then&lt;br /&gt;
                -- 若id为【BV1】开头时，当且仅当id长度为12位，且除去【BV1】后的部分均不包含小写l大写I、大写O和数字0时合法。&lt;br /&gt;
                if not mw.ustring.match(id, &amp;#039;^[bB][vV]1[a-km-zA-HJ-NP-Z0-9]+$&amp;#039;) then&lt;br /&gt;
                    result = false&lt;br /&gt;
                end&lt;br /&gt;
            elseif string.len(id) == 10 then&lt;br /&gt;
                -- 若id为【1】开头时，当且仅当id长度为10位，且除去【1】后的部分均不包含小写l大写I、大写O和数字0时合法。&lt;br /&gt;
                if not mw.ustring.match(id, &amp;#039;^1[a-km-zA-HJ-NP-Z0-9]+$&amp;#039;) then&lt;br /&gt;
                    result = false&lt;br /&gt;
                end&lt;br /&gt;
            elseif string.len(id) == 9 then&lt;br /&gt;
                -- 若id不满足上述四种情况时，当且仅当id长度为9位，且不包含小写l大写I、大写O和数字0时合法。&lt;br /&gt;
                if not mw.ustring.match(id, &amp;#039;^[a-km-zA-HJ-NP-Z0-9]+$&amp;#039;) then&lt;br /&gt;
                    result = false&lt;br /&gt;
                end&lt;br /&gt;
            else&lt;br /&gt;
                result = false&lt;br /&gt;
            end&lt;br /&gt;
        else&lt;br /&gt;
            result = false&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        if result then&lt;br /&gt;
            return &amp;#039;&amp;#039;&lt;br /&gt;
        else&lt;br /&gt;
            return frame:expandTemplate {title = &amp;#039;ArticleCategory&amp;#039;, args = {&amp;#039;Bilibili视频ID错误&amp;#039;}} ..&lt;br /&gt;
                    &amp;#039;&amp;lt;span class=&amp;quot;BilibiliVideoIDValidatorArgument&amp;quot; style=&amp;quot;display: none;&amp;quot;&amp;gt;&amp;#039; ..&lt;br /&gt;
                        frame.args.id .. &amp;#039;&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>imported&gt;=海豚=</name></author>
	</entry>
</feed>