<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Gzzzy's BLOG</title>
        <link>https://blog.gzzzy.top/</link>
        <description>未佩妥剑，出门便已是江湖</description>
        <lastBuildDate>Mon, 10 Apr 2023 16:07:43 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-CN</language>
        <copyright>All rights reserved 2023, Gzzzy</copyright>
        <item>
            <title><![CDATA[Windows11 微软拼音输入法设置小鹤双拼方案]]></title>
            <link>https://blog.gzzzy.top/article/win11-microsoft-shuangpin-xiaohe</link>
            <guid>https://blog.gzzzy.top/article/win11-microsoft-shuangpin-xiaohe</guid>
            <pubDate>Mon, 10 Apr 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[Win11 默认输入法微软拼音没有内置小鹤双拼，通过注册表修改的办法可以开启。]]></description>
            <content:encoded><![CDATA[<div id="container" class="mx-auto undefined"><main class="notion light-mode notion-page notion-block-c36926c43d794e02952be64097da9701"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><blockquote class="notion-quote notion-block-76b73af9b3fb403abdbe8b88a0e498ba"><div>Win11 默认输入法微软拼音没有内置小鹤双拼，通过注册表修改的办法可以开启。</div></blockquote><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-ef9eeea8d8ab4c30b4df2710059af8a8" data-id="ef9eeea8d8ab4c30b4df2710059af8a8"><span><div id="ef9eeea8d8ab4c30b4df2710059af8a8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#ef9eeea8d8ab4c30b4df2710059af8a8" title="方案一： 手动修改注册表"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>方案一：</b> 手动修改注册表</span></span></h2><ol start="1" class="notion-list notion-list-numbered notion-block-7b71d1b15e8549a9b778e8c98729b11a"><li>右键开始 → 运行 ( <code class="notion-inline-code">Win</code> + <code class="notion-inline-code">R</code> )：<code class="notion-inline-code">Regedit</code>（注册表编辑器）</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-681299c9c125486c87449ab6fb32d0ba"><li>定位计算机 <code class="notion-inline-code">\HKEY_CURRENT_USER\Software\Microsoft\InputMethod\Settings\CHS</code></li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-d50ed353c62a43faad0a687d5337970e"><li>右键 → 新建字符串值</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-905b68a92e764e5fb7c1285262d4b142"><li>数值名称： <code class="notion-inline-code">UserDefinedDoublePinyinScheme0</code></li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-f4a4a75a74114cd7bb6cdf525f2d117b"><li>数值数据： <code class="notion-inline-code">小鹤双拼*2*^*iuvdjhcwfg^xmlnpbksqszxkrltvyovt</code></li></ol><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-e88301293c0746118833187ed3bd3526" data-id="e88301293c0746118833187ed3bd3526"><span><div id="e88301293c0746118833187ed3bd3526" class="notion-header-anchor"></div><a class="notion-hash-link" href="#e88301293c0746118833187ed3bd3526" title="方案二： 使用注册表文件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title"><b>方案二：</b> 使用注册表文件</span></span></h2><div class="notion-text notion-block-b117f86db26d45d086bba5992603c351">保存以下代码为 <code class="notion-inline-code">xhup.reg</code> 文件，双击执行即可</div><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-shell">Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\InputMethod\Settings\CHS]
&quot;UserDefinedDoublePinyinScheme0&quot;=&quot;小鹤双拼*2*^*iuvdjhcwfg^xmlnpbksqszxkrltvyovt&quot;</code></pre><div class="notion-blank notion-block-9c6ce117607c4a97a03873706c230341"> </div><div class="notion-blank notion-block-87c459c0ff6547149acac5ba4ecedb3b"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Homebrew 使用指南]]></title>
            <link>https://blog.gzzzy.top/article/homebrew-compass</link>
            <guid>https://blog.gzzzy.top/article/homebrew-compass</guid>
            <pubDate>Fri, 07 Apr 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[The Missing Package Manager for macOS (or Linux)]]></description>
            <content:encoded><![CDATA[<div id="container" class="mx-auto undefined"><main class="notion light-mode notion-page notion-block-861ca59f110c4bf1a6cb166dabadce49"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><blockquote class="notion-quote notion-block-8cbdda902f1745009bd6e87ba2efa55d"><div>众所周知 MacOS 上安装软件相对 Windows 来说会麻烦一点，于是乎有了 Homebrew，它能让你一键安装软件且免去配置，快来试试吧！</div></blockquote><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-6a58a858c2ae43719def8a9d85d67b5b" data-id="6a58a858c2ae43719def8a9d85d67b5b"><span><div id="6a58a858c2ae43719def8a9d85d67b5b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#6a58a858c2ae43719def8a9d85d67b5b" title="安装"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装</span></span></h2><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-shell">/bin/bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&quot;</code></pre><figcaption class="notion-asset-caption">🔝 在 <b><code class="notion-inline-code"><span class="notion-red">终端</span></code></b><span class="notion-red"> </span>或其他 <b><code class="notion-inline-code"><span class="notion-red">shell</span></code></b><span class="notion-red"> </span>中粘贴以上命令并回车，下同不再赘述</figcaption><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-58699c47fe124ecb9e1ed5fa6d5050a6" data-id="58699c47fe124ecb9e1ed5fa6d5050a6"><span><div id="58699c47fe124ecb9e1ed5fa6d5050a6" class="notion-header-anchor"></div><a class="notion-hash-link" href="#58699c47fe124ecb9e1ed5fa6d5050a6" title="镜像源安装"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">镜像源安装</span></span></h3><div class="notion-callout notion-gray_background_co notion-block-35705493c86246ed986c6d4f187c024b"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text">如果你因为网络问题导致安装失败，请使用镜像源安装：</div></div><details class="notion-toggle notion-block-9299e0bc32a9449696b5808433969e63"><summary>方法1:</summary><div><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-shell">export HOMEBREW_BREW_GIT_REMOTE=&quot;https://mirrors.ustc.edu.cn/brew.git&quot;
export HOMEBREW_CORE_GIT_REMOTE=&quot;https://mirrors.ustc.edu.cn/homebrew-core.git&quot;
export HOMEBREW_BOTTLE_DOMAIN=&quot;https://mirrors.ustc.edu.cn/homebrew-bottles&quot;
export HOMEBREW_API_DOMAIN=&quot;https://mirrors.ustc.edu.cn/homebrew-bottles/api&quot;

/bin/bash -c &quot;$(curl -fsSL https://github.com/Homebrew/install/raw/HEAD/install.sh)&quot;</code></pre></div></details><details class="notion-toggle notion-block-07c09ed41909496fbdccb65068ff26f9"><summary>方法2:</summary><div><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-shell">/bin/bash -c &quot;$(curl -fsSL https://mirrors.ustc.edu.cn/misc/brew-install.sh)&quot;</code></pre></div></details><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-0cce7bf3970342d692612b607a6b18b3" data-id="0cce7bf3970342d692612b607a6b18b3"><span><div id="0cce7bf3970342d692612b607a6b18b3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#0cce7bf3970342d692612b607a6b18b3" title="配置镜像源(推荐)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">配置镜像源<span class="notion-red"><code class="notion-inline-code">(推荐)</code></span></span></span></h3><div class="notion-callout notion-gray_background_co notion-block-80ee4da24a5344188f304d43e996145f"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text">根据使用的客户端选择 <b><code class="notion-inline-code">对应</code></b> 的脚本执行，可使用 <b><code class="notion-inline-code">echo $0</code></b> 命令查看当前使用的客户端。</div></div><details class="notion-toggle notion-block-13ca9c0b49954f6ba74f770a0e291297"><summary>bash</summary><div><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-shell">echo &#x27;export HOMEBREW_BREW_GIT_REMOTE=&quot;https://mirrors.ustc.edu.cn/brew.git&quot;&#x27; &gt;&gt; ~/.bash_profile
echo &#x27;export HOMEBREW_CORE_GIT_REMOTE=&quot;https://mirrors.ustc.edu.cn/homebrew-core.git&quot;&#x27; &gt;&gt; ~/.bash_profile
echo &#x27;export HOMEBREW_BOTTLE_DOMAIN=&quot;https://mirrors.ustc.edu.cn/homebrew-bottles&quot;&#x27; &gt;&gt; ~/.bash_profile
echo &#x27;export HOMEBREW_API_DOMAIN=&quot;https://mirrors.ustc.edu.cn/homebrew-bottles/api&quot;&#x27; &gt;&gt; ~/.bash_profile
source ~/.bash_profile

brew update</code></pre></div></details><details class="notion-toggle notion-block-886ec3b986be4230ae7cff8aaa3aeb6d"><summary>zsh</summary><div><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-shell">echo &#x27;export HOMEBREW_BREW_GIT_REMOTE=&quot;https://mirrors.ustc.edu.cn/brew.git&quot;&#x27; &gt;&gt; ~/.zshrc
echo &#x27;export HOMEBREW_CORE_GIT_REMOTE=&quot;https://mirrors.ustc.edu.cn/homebrew-core.git&quot;&#x27; &gt;&gt; ~/.zshrc
echo &#x27;export HOMEBREW_BOTTLE_DOMAIN=&quot;https://mirrors.ustc.edu.cn/homebrew-bottles&quot;&#x27; &gt;&gt; ~/.zshrc
echo &#x27;export HOMEBREW_API_DOMAIN=&quot;https://mirrors.ustc.edu.cn/homebrew-bottles/api&quot;&#x27; &gt;&gt; ~/.zshrc
source ~/.zshrc

brew update</code></pre></div></details><h3 class="notion-h notion-h2 notion-h-indent-1 notion-block-2c81768fc6454a56b4faceea74b3eb30" data-id="2c81768fc6454a56b4faceea74b3eb30"><span><div id="2c81768fc6454a56b4faceea74b3eb30" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2c81768fc6454a56b4faceea74b3eb30" title="安装目录"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装目录</span></span></h3><div class="notion-text notion-block-549b02a12310402d84c94d6733855df6">软件自身以及使用 <b><code class="notion-inline-code"><span class="notion-red">brew install</span></code></b><span class="notion-red"> </span>安装的软件会存放在以下目录中，并自动软链接至 <b><code class="notion-inline-code">bin</code></b> 目录：<div class="notion-text-children"><ul class="notion-list notion-list-disc notion-block-1b634c17879641098987094f3b85d38e"><li>Mac Inter: <code class="notion-inline-code">/usr/local</code></li></ul><ul class="notion-list notion-list-disc notion-block-4e5ae6cbc0534fe99839bb8ffee3745a"><li>Mac Apple: <code class="notion-inline-code">/opt/homebrew</code></li></ul><ul class="notion-list notion-list-disc notion-block-225f8e69e9644851b32d51b0d344324c"><li>Linux: <code class="notion-inline-code">/home/linuxbrew/.linuxbrew</code></li></ul></div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-aa317f49f61b4f8e9c685e2a15d9a0b1" data-id="aa317f49f61b4f8e9c685e2a15d9a0b1"><span><div id="aa317f49f61b4f8e9c685e2a15d9a0b1" class="notion-header-anchor"></div><a class="notion-hash-link" href="#aa317f49f61b4f8e9c685e2a15d9a0b1" title="基本命令"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">基本命令</span></span></h2><details class="notion-toggle notion-block-3f06137cfa71447d942d495d2520d284"><summary>搜索软件:<code class="notion-inline-code"><span class="notion-red"><b>brew search</b></span></code><span class="notion-red"><b> </b></span></summary><div><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-shell">➜  ~ brew search jdk
==&gt; Formulae
openjdk ✔           openjdk@17 ✔        jd                  cdk
openjdk@11 ✔        openjdk@8           mdk

==&gt; Casks
adoptopenjdk               microsoft-openjdk11        semeru-jdk11-open
adoptopenjdk8              oracle-jdk                 semeru-jdk17-open
gama-jdk                   oracle-jdk-javadoc         semeru-jdk8-open
jdk-mission-control        sapmachine-jdk
microsoft-openjdk          semeru-jdk-open</code></pre><figcaption class="notion-asset-caption">🔝 模糊搜索软件，宁少打勿错打。</figcaption><div class="notion-callout notion-gray_background_co notion-block-267367c1490c47698321ccc5839e6c3e"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text">Formulae 与 Casks 最主要的区别在于：
——前者是一些底层软件、库，比如 Java。
——后者带图形界面，比如 Chrome。</div></div></div></details><details class="notion-toggle notion-block-1a373a89e068497bb07c21033381d727"><summary>安装软件:<code class="notion-inline-code"><b><span class="notion-red">brew install</span></b></code></summary><div><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-shell">brew install openjdk@17</code></pre><div class="notion-callout notion-gray_background_co notion-block-8b5d459d10d740c196547851793f9b61"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="💡">💡</span></div><div class="notion-callout-text">某些<b><code class="notion-inline-code">特定版本</code></b>安装后需要<b><code class="notion-inline-code">额外命令</code></b>才能让系统识别，比如 <b><code class="notion-inline-code">openjdk@17</code></b><b> </b>需要以下命令：</div></div><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-shell">sudo ln -sfn $HOMEBREW_PREFIX/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk</code></pre><figcaption class="notion-asset-caption">🔝 <span class="notion-red">https://formulae.brew.sh/formula/</span>openjdk@17
当你发现装完软件后系统无法识别安装的命令或其他未知错误，请优先参考<span class="notion-red"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://formulae.brew.sh/formula">脚本官网</a></span>。</figcaption></div></details><details class="notion-toggle notion-block-3a42b9e3dd674765ba165bf3887ab954"><summary>卸载软件:<code class="notion-inline-code"><b><span class="notion-red">brew uninstall</span></b></code></summary><div><pre class="notion-code"><div class="notion-code-copy"><div class="notion-code-copy-button"><svg fill="currentColor" viewBox="0 0 16 16" width="1em" version="1.1"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg></div></div><code class="language-shell">brew uninstall openjdk@17</code></pre><div class="notion-blank notion-block-b494bd21afb94442a6924f38bf4ce81b"> </div></div></details><div class="notion-blank notion-block-1c51e21aa5d542b3ad1803ea90f4121f"> </div><div class="notion-callout notion-gray_background_co notion-block-548416f3b77d4f8b95611ac8f04b5bd4"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="👨🏻‍💻">👨🏻‍💻</span></div><div class="notion-callout-text">未完待续</div></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-5d07dfe397434c2aa11e5d5b26eee714" data-id="5d07dfe397434c2aa11e5d5b26eee714"><span><div id="5d07dfe397434c2aa11e5d5b26eee714" class="notion-header-anchor"></div><a class="notion-hash-link" href="#5d07dfe397434c2aa11e5d5b26eee714" title="参考文章"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">参考文章</span></span></h2><div class="notion-row"><a target="_blank" rel="noopener noreferrer" class="notion-bookmark notion-block-6d34eb588f9e4259abd6e9cccc6c71a4" href="https://brew.sh/"><div><div class="notion-bookmark-title">Homebrew</div><div class="notion-bookmark-description">The Missing Package Manager for macOS (or Linux).</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-icon"><img src="https://brew.sh/assets/img/favicon.ico" alt="Homebrew" loading="lazy" decoding="async"/></div><div class="notion-bookmark-link-text">https://brew.sh/</div></div></div><div class="notion-bookmark-image"><img style="object-fit:cover" src="https://brew.sh/assets/img/homebrew-social-card.png" alt="Homebrew" loading="lazy" decoding="async"/></div></a></div><div class="notion-row"><a target="_blank" rel="noopener noreferrer" class="notion-bookmark notion-block-69c22853eb8040329b72233b3c869334" href="https://mirrors.ustc.edu.cn/help/brew.git.html#homebrew"><div><div class="notion-bookmark-title">Homebrew 源使用帮助 — USTC Mirror Help  文档</div><div class="notion-bookmark-link"><div class="notion-bookmark-link-text">https://mirrors.ustc.edu.cn/help/brew.git.html#homebrew</div></div></div></a></div><div class="notion-blank notion-block-b6ae750368b64011bcda36c77777fbe5"> </div><div class="notion-callout notion-gray_background_co notion-block-ad718bce51b141a59c6dc63e06f0f8c9"><div class="notion-page-icon-inline notion-page-icon-span"><span class="notion-page-icon" role="img" aria-label="🔚">🔚</span></div><div class="notion-callout-text">有关 <code class="notion-inline-code">Homebrew</code> 安装或者使用上的问题，欢迎您在底部评论区留言，一起交流~</div></div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[正则表达式手册]]></title>
            <link>https://blog.gzzzy.top/article/regexp</link>
            <guid>https://blog.gzzzy.top/article/regexp</guid>
            <pubDate>Wed, 15 Mar 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[正则表达式手册]]></description>
            <content:encoded><![CDATA[<div id="container" class="mx-auto undefined"><main class="notion light-mode notion-page notion-block-caf8b747587f4051a038e1f694819aa1"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-ce01f04ee0904c909413aede7ce51e86" data-id="ce01f04ee0904c909413aede7ce51e86"><span><div id="ce01f04ee0904c909413aede7ce51e86" class="notion-header-anchor"></div><a class="notion-hash-link" href="#ce01f04ee0904c909413aede7ce51e86" title="表达式全集"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">表达式全集</span></span></h2><table class="notion-simple-table notion-block-04f885c3a2844f0694ebfaa116a925f6"><tbody><tr class="notion-simple-table-row notion-block-e0d5a230b0a549e3be16d3328f52a54f"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">字符</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">描述</div></td></tr><tr class="notion-simple-table-row notion-block-0f3b82cf0ccd41258bc590677f7c799c"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">将下一个字符标记为一个特殊字符、或一个原义字符、或一个向后引用、或一个八进制转义符。例如，“<code class="notion-inline-code">n</code>”匹配字符“<code class="notion-inline-code">n</code>”。“<code class="notion-inline-code">\n</code>”匹配一个换行符。串行“<code class="notion-inline-code">\\</code>”匹配“<code class="notion-inline-code">\</code>”而“<code class="notion-inline-code">\(</code>”则匹配“<code class="notion-inline-code">(</code>”。</div></td></tr><tr class="notion-simple-table-row notion-block-1f761720a864416685565bb171e40d26"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">^</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配输入字符串的开始位置。如果设置了RegExp对象的Multiline属性，^也匹配“<code class="notion-inline-code">\n</code>”或“<code class="notion-inline-code">\r</code>”之后的位置。</div></td></tr><tr class="notion-simple-table-row notion-block-28c5266392ec45c99fb7dacb3cf4beb7"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">$</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配输入字符串的结束位置。如果设置了RegExp对象的Multiline属性，$也匹配“<code class="notion-inline-code">\n</code>”或“<code class="notion-inline-code">\r</code>”之前的位置。</div></td></tr><tr class="notion-simple-table-row notion-block-17308d91718443ed822cc59c8720a3cd"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">*</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配前面的子表达式零次或多次。例如，zo*能匹配“<code class="notion-inline-code">z</code>”以及“<code class="notion-inline-code">zoo</code>”。*等价于{0,}。</div></td></tr><tr class="notion-simple-table-row notion-block-3a41a2573e5644e8ad034a21128a2d77"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">+</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配前面的子表达式一次或多次。例如，“<code class="notion-inline-code">zo+</code>”能匹配“<code class="notion-inline-code">zo</code>”以及“<code class="notion-inline-code">zoo</code>”，但不能匹配“<code class="notion-inline-code">z</code>”。+等价于{1,}。</div></td></tr><tr class="notion-simple-table-row notion-block-a56b19e59074429d806f54970f186781"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">?</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配前面的子表达式零次或一次。例如，“<code class="notion-inline-code">do(es)?</code>”可以匹配“<code class="notion-inline-code">does</code>”或“<code class="notion-inline-code">does</code>”中的“<code class="notion-inline-code">do</code>”。?等价于{0,1}。</div></td></tr><tr class="notion-simple-table-row notion-block-fc3a4bf3b8cd4d05b9e96c8eacd44fb5"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">{<em>n</em>}</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell"><em>n</em>是一个非负整数。匹配确定的<em>n</em>次。例如，“<code class="notion-inline-code">o{2}</code>”不能匹配“<code class="notion-inline-code">Bob</code>”中的“<code class="notion-inline-code">o</code>”，但是能匹配“<code class="notion-inline-code">food</code>”中的两个o。</div></td></tr><tr class="notion-simple-table-row notion-block-fd2216ab7fe540d4a5569e8eedb970e7"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">{<em>n</em>,}</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell"><em>n</em>是一个非负整数。至少匹配<em>n</em>次。例如，“<code class="notion-inline-code">o{2,}</code>”不能匹配“<code class="notion-inline-code">Bob</code>”中的“<code class="notion-inline-code">o</code>”，但能匹配“<code class="notion-inline-code">foooood</code>”中的所有o。“<code class="notion-inline-code">o{1,}</code>”等价于“<code class="notion-inline-code">o+</code>”。“<code class="notion-inline-code">o{0,}</code>”则等价于“<code class="notion-inline-code">o*</code>”。</div></td></tr><tr class="notion-simple-table-row notion-block-62428d6905764c43ac3edfe365ddb79e"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">{<em>n</em><span style="padding:0.5em"></span><em>m</em>}</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell"><em>m</em>和<em>n</em>均为非负整数，其中<em>n</em>&lt;=<em>m</em>。最少匹配<em>n</em>次且最多匹配<em>m</em>次。例如，“<code class="notion-inline-code">o{1,3}</code>”将匹配“<code class="notion-inline-code">fooooood</code>”中的前三个o。“<code class="notion-inline-code">o{0,1}</code>”等价于“<code class="notion-inline-code">o?</code>”。请注意在逗号和两个数之间不能有空格。</div></td></tr><tr class="notion-simple-table-row notion-block-0a77f48000074e998ea9902a340705bf"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">?</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">当该字符紧跟在任何一个其他限制符（*,+,?，{<em>n</em>}，{<em>n</em>,}，{<em>n</em><span style="padding:0.5em"></span><em>m</em>}）后面时，匹配模式是非贪婪的。非贪婪模式尽可能少的匹配所搜索的字符串，而默认的贪婪模式则尽可能多的匹配所搜索的字符串。例如，对于字符串“<code class="notion-inline-code">oooo</code>”，“<code class="notion-inline-code">o+?</code>”将匹配单个“<code class="notion-inline-code">o</code>”，而“<code class="notion-inline-code">o+</code>”将匹配所有“<code class="notion-inline-code">o</code>”。</div></td></tr><tr class="notion-simple-table-row notion-block-272a672fab7a44d6a443802c8099e9c4"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">.</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配除“<code class="notion-inline-code">\</code><code class="notion-inline-code"><em>n</em></code>”之外的任何单个字符。要匹配包括“<code class="notion-inline-code">\</code><code class="notion-inline-code"><em>n</em></code>”在内的任何字符，请使用像“<code class="notion-inline-code">(.|\n)</code>”的模式。</div></td></tr><tr class="notion-simple-table-row notion-block-1a117ed53c3145cc816248685420590a"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">(pattern)</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配pattern并获取这一匹配。所获取的匹配可以从产生的Matches集合得到，在VBScript中使用SubMatches集合，在JScript中则使用$0…$9属性。要匹配圆括号字符，请使用“<code class="notion-inline-code">\(</code>”或“<code class="notion-inline-code">\)</code>”。</div></td></tr><tr class="notion-simple-table-row notion-block-744f2f0f5b6349c4bf043efb3f80dad7"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">(?:pattern)</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配pattern但不获取匹配结果，也就是说这是一个非获取匹配，不进行存储供以后使用。这在使用或字符“<code class="notion-inline-code">(|)</code>”来组合一个模式的各个部分是很有用。例如“<code class="notion-inline-code">industr(?:y|ies)</code>”就是一个比“<code class="notion-inline-code">industry|industries</code>”更简略的表达式。</div></td></tr><tr class="notion-simple-table-row notion-block-e72660aa95674c59b4a39780f0e55509"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">(?=pattern)</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">正向肯定预查，在任何匹配pattern的字符串开始处匹配查找字符串。这是一个非获取匹配，也就是说，该匹配不需要获取供以后使用。例如，“<code class="notion-inline-code">Windows(?=95|98|NT|2000)</code>”能匹配“<code class="notion-inline-code">Windows2000</code>”中的“<code class="notion-inline-code">Windows</code>”，但不能匹配“<code class="notion-inline-code">Windows3.1</code>”中的“<code class="notion-inline-code">Windows</code>”。预查不消耗字符，也就是说，在一个匹配发生后，在最后一次匹配之后立即开始下一次匹配的搜索，而不是从包含预查的字符之后开始。</div></td></tr><tr class="notion-simple-table-row notion-block-a3e202c7d56641f0954ab1c88a70f68b"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">(?!pattern)</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">正向否定预查，在任何不匹配pattern的字符串开始处匹配查找字符串。这是一个非获取匹配，也就是说，该匹配不需要获取供以后使用。例如“<code class="notion-inline-code">Windows(?!95|98|NT|2000)</code>”能匹配“<code class="notion-inline-code">Windows3.1</code>”中的“<code class="notion-inline-code">Windows</code>”，但不能匹配“<code class="notion-inline-code">Windows2000</code>”中的“<code class="notion-inline-code">Windows</code>”。预查不消耗字符，也就是说，在一个匹配发生后，在最后一次匹配之后立即开始下一次匹配的搜索，而不是从包含预查的字符之后开始</div></td></tr><tr class="notion-simple-table-row notion-block-37b0de12c15d459fa71d2b4879e05cfc"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">(?&lt;=pattern)</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">反向肯定预查，与正向肯定预查类拟，只是方向相反。例如，“<code class="notion-inline-code">(?&lt;=95|98|NT|2000)Windows</code>”能匹配“<code class="notion-inline-code">2000Windows</code>”中的“<code class="notion-inline-code">Windows</code>”，但不能匹配“<code class="notion-inline-code">3.1Windows</code>”中的“<code class="notion-inline-code">Windows</code>”。</div></td></tr><tr class="notion-simple-table-row notion-block-6552083431d148fcaf62b4b741264d87"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">(?&lt;!pattern)</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">反向否定预查，与正向否定预查类拟，只是方向相反。例如“<code class="notion-inline-code">(?&lt;!95|98|NT|2000)Windows</code>”能匹配“<code class="notion-inline-code">3.1Windows</code>”中的“<code class="notion-inline-code">Windows</code>”，但不能匹配“<code class="notion-inline-code">2000Windows</code>”中的“<code class="notion-inline-code">Windows</code>”。</div></td></tr><tr class="notion-simple-table-row notion-block-655222b06db3481a852c4bba33da4643"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">x|y</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配x或y。例如，“<code class="notion-inline-code">z|food</code>”能匹配“<code class="notion-inline-code">z</code>”或“<code class="notion-inline-code">food</code>”。“<code class="notion-inline-code">(z|f)ood</code>”则匹配“<code class="notion-inline-code">zood</code>”或“<code class="notion-inline-code">food</code>”。</div></td></tr><tr class="notion-simple-table-row notion-block-e92a9182d0c8436b9ef9bf67b3a6a4c0"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">[xyz]</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">字符集合。匹配所包含的任意一个字符。例如，“<code class="notion-inline-code">[abc]</code>”可以匹配“<code class="notion-inline-code">plain</code>”中的“<code class="notion-inline-code">a</code>”。</div></td></tr><tr class="notion-simple-table-row notion-block-30bddaac46a947d8bae8378f66620350"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">[^xyz]</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">负值字符集合。匹配未包含的任意字符。例如，“<code class="notion-inline-code">[^abc]</code>”可以匹配“<code class="notion-inline-code">plain</code>”中的“<code class="notion-inline-code">p</code>”。</div></td></tr><tr class="notion-simple-table-row notion-block-b5a427118ab24233bc2e7150292a11dc"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">[a-z]</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">字符范围。匹配指定范围内的任意字符。例如，“<code class="notion-inline-code">[a-z]</code>”可以匹配“<code class="notion-inline-code">a</code>”到“<code class="notion-inline-code">z</code>”范围内的任意小写字母字符。</div></td></tr><tr class="notion-simple-table-row notion-block-1f996551c1c4441aa6503d350c44346e"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">[^a-z]</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">负值字符范围。匹配任何不在指定范围内的任意字符。例如，“<code class="notion-inline-code">[^a-z]</code>”可以匹配任何不在“<code class="notion-inline-code">a</code>”到“<code class="notion-inline-code">z</code>”范围内的任意字符。</div></td></tr><tr class="notion-simple-table-row notion-block-44c66aa5528d449fa31268528c806c11"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\b</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配一个单词边界，也就是指单词和空格间的位置。例如，“<code class="notion-inline-code">er\b</code>”可以匹配“<code class="notion-inline-code">never</code>”中的“<code class="notion-inline-code">er</code>”，但不能匹配“<code class="notion-inline-code">verb</code>”中的“<code class="notion-inline-code">er</code>”。</div></td></tr><tr class="notion-simple-table-row notion-block-20d15145e69348d3b2eecdd56fc3e2d5"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\B</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配非单词边界。“<code class="notion-inline-code">er\B</code>”能匹配“<code class="notion-inline-code">verb</code>”中的“<code class="notion-inline-code">er</code>”，但不能匹配“<code class="notion-inline-code">never</code>”中的“<code class="notion-inline-code">er</code>”。</div></td></tr><tr class="notion-simple-table-row notion-block-a31af3cb4f69462dbfb5a95006540972"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\cx</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配由x指明的控制字符。例如，\cM匹配一个Control-M或回车符。x的值必须为A-Z或a-z之一。否则，将c视为一个原义的“<code class="notion-inline-code">c</code>”字符。</div></td></tr><tr class="notion-simple-table-row notion-block-fef9717d13a346b8be35ff6ec18f18ff"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\d</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配一个数字字符。等价于[0-9]。</div></td></tr><tr class="notion-simple-table-row notion-block-8ccb1bae2af64ec19456036baff49e3a"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\D</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配一个非数字字符。等价于[^0-9]。</div></td></tr><tr class="notion-simple-table-row notion-block-077616f5470a4c32a0e00d4e6a72fe6c"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\f</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配一个换页符。等价于\x0c和\cL。</div></td></tr><tr class="notion-simple-table-row notion-block-dde768f2fe9d4042b983f559a975857d"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\n</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配一个换行符。等价于\x0a和\cJ。</div></td></tr><tr class="notion-simple-table-row notion-block-016eb589935245f089d8d599a67d9f40"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\r</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配一个回车符。等价于\x0d和\cM。</div></td></tr><tr class="notion-simple-table-row notion-block-7051ef86152449619c01fc759cf87105"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\s</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配任何空白字符，包括空格、制表符、换页符等等。等价于[ \f\n\r\t\v]。</div></td></tr><tr class="notion-simple-table-row notion-block-d9c0c9ae9cbc4871b6457910887cdbdc"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\S</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配任何非空白字符。等价于[^ \f\n\r\t\v]。</div></td></tr><tr class="notion-simple-table-row notion-block-db75a4b889784b5b87e3fa922e273cd0"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\t</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配一个制表符。等价于\x09和\cI。</div></td></tr><tr class="notion-simple-table-row notion-block-ca535b99f077425d8c8321fe4f959e78"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\v</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配一个垂直制表符。等价于\x0b和\cK。</div></td></tr><tr class="notion-simple-table-row notion-block-1bc4f5ac61654f6290c22b9ab81e7ddf"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\w</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配包括下划线的任何单词字符。等价于“<code class="notion-inline-code">[A-Za-z0-9_]</code>”。</div></td></tr><tr class="notion-simple-table-row notion-block-a4243f2a6c6c494089be2741ba1e8b00"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\W</div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配任何非单词字符。等价于“<code class="notion-inline-code">[^A-Za-z0-9_]</code>”。</div></td></tr><tr class="notion-simple-table-row notion-block-5608e0b3fd5e4a5c8f29470806e02c4c"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\x<em>n</em></div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配<em>n</em>，其中<em>n</em>为十六进制转义值。十六进制转义值必须为确定的两个数字长。例如，“<code class="notion-inline-code">\x41</code>”匹配“<code class="notion-inline-code">A</code>”。“<code class="notion-inline-code">\x041</code>”则等价于“<code class="notion-inline-code">\x04&amp;1</code>”。正则表达式中可以使用ASCII编码。.</div></td></tr><tr class="notion-simple-table-row notion-block-c7ad1ccf4c39410481e4b4725d8b4a16"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\<em>num</em></div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配<em>num</em>，其中<em>num</em>是一个正整数。对所获取的匹配的引用。例如，“<code class="notion-inline-code">(.)\1</code>”匹配两个连续的相同字符。</div></td></tr><tr class="notion-simple-table-row notion-block-cc9d4d369b984636b20cf7f882defcd5"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\<em>n</em></div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">标识一个八进制转义值或一个向后引用。如果\<em>n</em>之前至少<em>n</em>个获取的子表达式，则<em>n</em>为向后引用。否则，如果<em>n</em>为八进制数字（0-7），则<em>n</em>为一个八进制转义值。</div></td></tr><tr class="notion-simple-table-row notion-block-b04887d194a540179b75b5388bb940ae"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\<em>nm</em></div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">标识一个八进制转义值或一个向后引用。如果\<em>nm</em>之前至少有<em>nm</em>个获得子表达式，则<em>nm</em>为向后引用。如果\<em>nm</em>之前至少有<em>n</em>个获取，则<em>n</em>为一个后跟文字<em>m</em>的向后引用。如果前面的条件都不满足，若<em>n</em>和<em>m</em>均为八进制数字（0-7），则\<em>nm</em>将匹配八进制转义值<em>nm</em>。</div></td></tr><tr class="notion-simple-table-row notion-block-c471af5291044ffca422616a78961932"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\<em>nml</em></div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">如果<em>n</em>为八进制数字（0-3），且<em>m和l</em>均为八进制数字（0-7），则匹配八进制转义值<em>nm</em>l。</div></td></tr><tr class="notion-simple-table-row notion-block-e3f515d65b6a4c90b3a50dbd8ee10479"><td class="notion-default" style="width:157px"><div class="notion-simple-table-cell">\u<em>n</em></div></td><td class="notion-default" style="width:511px"><div class="notion-simple-table-cell">匹配<em>n</em>，其中<em>n</em>是一个用四个十六进制数字表示的Unicode字符。例如，\u00A9匹配版权符号（©）。</div></td></tr></tbody></table><h2 class="notion-h notion-h1 notion-h-indent-0 notion-block-a9548649584f46459340aba0e1691c75" data-id="a9548649584f46459340aba0e1691c75"><span><div id="a9548649584f46459340aba0e1691c75" class="notion-header-anchor"></div><a class="notion-hash-link" href="#a9548649584f46459340aba0e1691c75" title="常用正则表达式"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">常用正则表达式</span></span></h2><table class="notion-simple-table notion-block-de352263d2744aa2b423890eb652b303"><tbody><tr class="notion-simple-table-row notion-block-7352346b7c9743359300c5270419ada7"><td class="" style="width:158.1796875px"><div class="notion-simple-table-cell">用户名</div></td><td class="" style="width:508px"><div class="notion-simple-table-cell">/^[a-z0-9_-]{3,16}$/</div></td></tr><tr class="notion-simple-table-row notion-block-451e30a079334a89b5fe528a00409dd6"><td class="" style="width:158.1796875px"><div class="notion-simple-table-cell">密码</div></td><td class="" style="width:508px"><div class="notion-simple-table-cell">/^[a-z0-9_-]{6,18}$/</div></td></tr><tr class="notion-simple-table-row notion-block-5be72c7a0778483785daf3ae28a8fb9e"><td class="" style="width:158.1796875px"><div class="notion-simple-table-cell">十六进制值</div></td><td class="" style="width:508px"><div class="notion-simple-table-cell">/^#?([a-f0-9]{6}|[a-f0-9]{3})$/</div></td></tr><tr class="notion-simple-table-row notion-block-a828ae3d710f4f3faed1ad3415ec6df2"><td class="" style="width:158.1796875px"><div class="notion-simple-table-cell">电子邮箱</div></td><td class="" style="width:508px"><div class="notion-simple-table-cell">/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/<!-- -->/^[a-z\d]+(\.[a-z\d]+)*@([\da-z](-[\da-z])?)+(\.{1,2}[a-z]+)+$/</div></td></tr><tr class="notion-simple-table-row notion-block-239448b7b2e44c7b9a9b86811bf21369"><td class="" style="width:158.1796875px"><div class="notion-simple-table-cell">URL</div></td><td class="" style="width:508px"><div class="notion-simple-table-cell">/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/</div></td></tr><tr class="notion-simple-table-row notion-block-6ea9572dcfa948daac3eb307f673d674"><td class="" style="width:158.1796875px"><div class="notion-simple-table-cell">IP 地址</div></td><td class="" style="width:508px"><div class="notion-simple-table-cell">/((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)/<!-- -->/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/</div></td></tr><tr class="notion-simple-table-row notion-block-3c8eaae8705d46c9ba3d77d9f96e5142"><td class="" style="width:158.1796875px"><div class="notion-simple-table-cell">HTML 标签</div></td><td class="" style="width:508px"><div class="notion-simple-table-cell">/^&lt;([a-z]+)([^&lt;]+)*(?:&gt;(.*)&lt;\/\1&gt;|\s+\/&gt;)$/</div></td></tr><tr class="notion-simple-table-row notion-block-6a2eab7f60a74bb6a370acaad78fe569"><td class="" style="width:158.1796875px"><div class="notion-simple-table-cell">删除代码\\注释</div></td><td class="" style="width:508px"><div class="notion-simple-table-cell">(?&lt;!http:|\S)//.*$</div></td></tr><tr class="notion-simple-table-row notion-block-4019a3c05baa46888809f183d14155f9"><td class="" style="width:158.1796875px"><div class="notion-simple-table-cell">Unicode编码中的汉字范围</div></td><td class="" style="width:508px"><div class="notion-simple-table-cell">/^[\u2E80-\u9FFF]+$/</div></td></tr></tbody></table></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>