<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>机器学习初学者</title>
    <link>https://wechat2rss.xlab.app/feed/c5f385197ef56f9345db0daf1e46419af8c7d664.xml</link>
    <description>致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！&#xA;(wechat feed made by @ttttmr https://wechat2rss.xlab.app)</description>
    <managingEditor> (机器学习初学者)</managingEditor>
    <image>
      <url>http://wx.qlogo.cn/mmhead/Q3auHgzwzM5kMibbOB5P2uiaPYjRpMDp99Y7IbW1LlQUwMC07unOzmmg/0</url>
      <title>机器学习初学者</title>
      <link>https://wechat2rss.xlab.app/feed/c5f385197ef56f9345db0daf1e46419af8c7d664.xml</link>
    </image>
    <item>
      <title>学生吐槽：为什么大学里管行政的老师很多都脸难看？</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526320&amp;idx=1&amp;sn=956b3eb6e3d01cfde558894b47cbe24e</link>
      <description></description>
      <content:encoded><![CDATA[<p>
<span></span> <span>2025-08-16 15:40</span> <span style="display: inline-block;">浙江</span>
</p>




<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=75383b3d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2F87HjJEl4c1tT6uwArFiaee0kVPZORl3GUv2rJqJu0NnZsMfkLzclcpZTusea8Zo5W9kicyNibY1k22Z9R2A9Z7xzw%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p><span style="color: rgb(25, 27, 31);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, &#34;MiSans L3&#34;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;" data-pm-slice="0 0 []"><span leaf="">本人985小硕一枚，因为项目合同立项 审批等等需要和行政这边的人打交道，发现行政这边的人员脾气貌似普遍不好，说话语气差态度奇差。</span></span><br data-first-child="" style="margin-top: 0px;color: rgb(25, 27, 31);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, &#34;MiSans L3&#34;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"/><span style="color: rgb(25, 27, 31);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, &#34;MiSans L3&#34;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;"><span leaf="">比如某办公室一老年行政，即使你材料妥妥当当不出问题，也要对着你牢骚几句，脸色永远是一副恶劣仿佛你是讨债的一般，而对外部的来访人员一副笑脸。有次我同学盖章，刚进去交材料就被训出来，“说是你进来干吗？出去”但是他交材料不进去怎么交，那老年行政又不会出来拿，后来被刁难几句后所幸这章是盖了。。</span></span><br style="color: rgb(25, 27, 31);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, &#34;MiSans L3&#34;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"/><span style="color: rgb(25, 27, 31);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, &#34;MiSans L3&#34;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;"><span leaf="">学生去办事永远是低声下气的，行政人员永远是趾高气昂的。学生被训几句忍了就是，更让我惊讶的是，某次遇到某个老教授被行政人员很大声地训斥（也许达不到训斥的地步，但态度非常不好）老教授一脸赔笑。。。</span></span><br style="margin-bottom: 0px;color: rgb(25, 27, 31);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, &#34;MiSans L3&#34;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"/><span style="color: rgb(25, 27, 31);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, &#34;MiSans L3&#34;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;"><span leaf="">按理说，学校的这些工作人员都是下午5点就下班永远没有加班一说，工作量也少，工作压力也没那么大吧，他们这样的性格是因为工作原因造成的还是学校在招聘筛选的时候有意识地筛选的？造成这种工作风气的根源在哪里？ 国外高校的行政也是这样的吗？</span></span></p><div data-tool="markdown2wechat编辑器" data-website="https://aizhuanqian.com" style="font-size: 16px;color: black;padding: 0 10px;line-height: 1.6;word-spacing: 0px;letter-spacing: 0px;word-break: break-word;word-wrap: break-word;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#39;PingFang SC&#39;, Cambria, Cochin, Georgia, Times, &#39;Times New Roman&#39;, serif;" data-pm-slice="0 0 []"><h2 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;border-bottom: 2px solid rgb(239, 112, 96);font-size: 1.3em;"><span style="display: none;"></span><span style="display: inline-block;font-weight: bold;background: rgb(239, 112, 96);color: #ffffff;padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;"><span leaf="">高赞回复一</span></span><span></span><span style="display: inline-block;vertical-align: bottom;border-bottom: 36px solid #efebe9;border-right: 20px solid transparent;"></span></h2><p data-pm-slice="4 2 []"><span style="color: rgb(25, 27, 31);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, &#34;MiSans L3&#34;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;"><p><span leaf="" data-pm-slice="1 1 [&#34;para&#34;,{&#34;tagName&#34;:&#34;p&#34;,&#34;attributes&#34;:{},&#34;namespaceURI&#34;:&#34;http://www.w3.org/1999/xhtml&#34;}]">作者：匿名用户</span></p></span></p><p data-first-child="" data-pid="--PVeZQL" data-pm-slice="0 0 []"><span leaf="">你以为老师就不吐槽了吗，老师吐槽的更多，但是吧，也不能当面吐槽，毕竟还得找他们办事。。。</span></p><p data-pid="gWSKUBhd"><span leaf="">现在很多行政就是个复制粘贴的工具，上面发的通知，他往微信群里一转发就完事儿了，你要是没看到，那是你自己的事儿，他才不管。别人问他什么，他根本不解读，就再复制粘贴一次通知让你自己看。</span></p><p data-pid="SG6dfkU9"><span leaf="">要收集什么资料了，表格发给你自己填，甚至有什么事情问完你了，明明也告诉他们了，还是发个表格给你自己填…他就只想复制粘贴。</span></p><p data-pid="GDLksz1s"><span leaf="">还有一个我最无语的，自科现在提倡无纸化，但是我们学校在校内审核这一步非要我们提供纸质版，哪怕是在疫情期间，也是要我们打印出来交给他，他们看完只纸质的再去网上审核，我是真的搞不懂…直接在系统里看不好吗？</span></p><p data-pid="puhmu8be"><span leaf="">还有各种流程上的死板，各种领导签字，我也想知道领导们不烦么？</span></p><p data-pid="9RqqQmq2"><span leaf="">我也知道有些行政对学生更差，态度更差，但是办事吧，对谁都那样。至于说原因，一个是钱少，你对他们还能有什么要求，还有一个是这些行政岗位挺闲的，很多都是学校领导的亲戚…我读研的时候，那个院所有的行政只有一个人是没有关系背景的，也就只有他一个是工作多态度还很好的。</span></p><p data-pid="dFi2GvU4"><span leaf="">另外，教务处的老师真的不应该被吐槽，他们是学校里的清水衙门</span><svg width="10px" height="10px" viewBox="0 0 16 16" fill="currentColor"><path d="m5.068 9.267-3.08-.77a.512.512 0 0 1 0-.994l3.08-.77a2.289 2.289 0 0 0 1.665-1.665l.77-3.08a.512.512 0 0 1 .994 0l.77 3.08c.205.82.845 1.46 1.665 1.665l3.08.77a.512.512 0 0 1 0 .994l-3.08.77a2.29 2.29 0 0 0-1.665 1.665l-.77 3.08a.512.512 0 0 1-.994 0l-.77-3.08a2.289 2.289 0 0 0-1.665-1.665Z"></path></svg><span leaf="">，工作量特别大，不耐烦一点我是可以理解的。</span></p><h2 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;border-bottom: 2px solid rgb(239, 112, 96);font-size: 1.3em;"><span style="display: none;"></span><span style="display: inline-block;font-weight: bold;background: rgb(239, 112, 96);color: #ffffff;padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;"><span leaf="">高赞回复二</span></span><span></span><span style="display: inline-block;vertical-align: bottom;border-bottom: 36px solid #efebe9;border-right: 20px solid transparent;"></span></h2><p data-pm-slice="2 2 []"><span leaf="">作者：一一</span></p><p data-first-child="" data-pid="WdLH4SlP" style="margin: 0px 0px 1.4em;color: rgb(25, 27, 31);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, &#34;MiSans L3&#34;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;" data-pm-slice="0 0 []"><span leaf="">简单来说，能力不行。</span></p><p data-pid="rEEJY0vH" style="margin: 1.4em 0px;color: rgb(25, 27, 31);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, &#34;MiSans L3&#34;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"><span leaf="">大部分都是人才带来的傻老婆，或者傻老公。</span></p><p data-pid="Mh0bZtfE" style="margin: 1.4em 0px;color: rgb(25, 27, 31);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, &#34;MiSans L3&#34;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"><span leaf="">自己没有找工作的能力，跟另一半混。</span></p><p data-pid="thytKngf" style="margin: 1.4em 0px;color: rgb(25, 27, 31);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, &#34;MiSans L3&#34;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"><span leaf="">这样的人，能力和耐心都不会太强。</span></p><p data-pid="tC5OH7G_" style="margin: 1.4em 0px 0px;color: rgb(25, 27, 31);font-family: -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;PingFang SC&#34;, &#34;Microsoft YaHei&#34;, &#34;Source Han Sans SC&#34;, &#34;Noto Sans CJK SC&#34;, &#34;WenQuanYi Micro Hei&#34;, &#34;MiSans L3&#34;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"><span leaf="">为什么我这么了解呢，因为我就在催着我老婆把我弄到他们学校图书馆。</span></p><h2 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;border-bottom: 2px solid rgb(239, 112, 96);font-size: 1.3em;"><span style="display: none;"></span><span style="display: inline-block;font-weight: bold;background: rgb(239, 112, 96);color: #ffffff;padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;"><span leaf="">高赞回复三</span></span><span></span><span style="display: inline-block;vertical-align: bottom;border-bottom: 36px solid #efebe9;border-right: 20px solid transparent;"></span></h2><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">作者：进击的小毛睿</span></p><p><span leaf="">高校行政部门的特点：</span></p><p><span leaf="">1、女的多，特别感性，随性而为的比较多。</span></p><p><span leaf="">2、背景硬，多是领导家属，发火有底气，敢发火。</span></p><p><span leaf="">3、事业编，铁饭碗，怎么折腾都永远不用担心被辞退。</span></p><p><span leaf="">这就决定他们脾气不会太好。</span></p></div><div data-tool="markdown2wechat编辑器" data-website="https://aizhuanqian.com" style="font-size: 16px;color: black;padding: 0 10px;line-height: 1.6;word-spacing: 0px;letter-spacing: 0px;word-break: break-word;word-wrap: break-word;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#39;PingFang SC&#39;, Cambria, Cochin, Georgia, Times, &#39;Times New Roman&#39;, serif;" data-pm-slice="4 3 []"><h2 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;border-bottom: 2px solid rgb(239, 112, 96);font-size: 1.3em;"><span style="display: inline-block;font-weight: bold;background: rgb(239, 112, 96);color: #ffffff;padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;"><span leaf="">高赞回复四</span></span><span></span><span style="display: inline-block;vertical-align: bottom;border-bottom: 36px solid #efebe9;border-right: 20px solid transparent;"></span></h2><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">作者：匿名用户</span></p><p data-first-child="" data-pid="CUvsHzUm" data-pm-slice="0 0 []"><span leaf="">因为好的大学的正式的行政岗位都是美差，没有关系基本很难进的，所以里面的老师都牛逼轰轰的（毕竟关系户）。除了工资可能不能太高以外（当然也不会太低），基本没有什么缺点了，工作轻松，福利待遇好，上下班时间基本你自己说了算，工作环境还很单纯，对着的都是一群没什么话语权的学生。</span></p><p data-pid="tBIw-Tne"><span leaf="">我的感受就是，能够尽量减少跟他们的接触就减少跟他们的接触…有时候教务处网站上发一个通知，明明是他们自己写得不清楚，学生打电话过去询问还超级不耐烦。去保卫处咨询学生证火车票充磁的事情，值班的老师就很凶的一句不知道把你打发了，本来就是你们部门的事情，就算不归你管你也应该告诉我该找谁吧，动不动就甩脸子给谁看啊。</span></p><p data-pid="P5XcUTO2"><span leaf="">永远是一副大爷的样子，对着青年教学老师脾气也没能好到哪里去。官僚气息不能更重了。中午不到十一点二十就下班，下午四点半以后别想找到人。</span></p><p data-pid="wjBIbnNy"><span leaf="">我对待他们这样的工作态度就是很反感。教学老师和辅导员对学生的态度跟他们比都好到天上去了，本来也是一个服务师生的岗位，我们谁都不欠谁的，帮学生老师办事难道不是你的份内事嘛？怎么成了我们求着你办事。</span></p><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p></div><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247526320">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=18ed4c4f&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526320%26idx%3D1%26sn%3D956b3eb6e3d01cfde558894b47cbe24e">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sat, 16 Aug 2025 15:40:00 +0800</pubDate>
    </item>
    <item>
      <title>图像基础处理保姆级教程（蒙娜丽莎图像为例）</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526320&amp;idx=2&amp;sn=60b8423ed64f37a8569250a5577652ad</link>
      <description>公众号：尤而小屋编辑：Peter作者：Peter大家好，我是Peter~图像基础处理是计算机视觉和数字图像处</description>
      <content:encoded><![CDATA[<p>
<span>Peter</span> <span>2025-08-16 15:40</span> <span style="display: inline-block;">浙江</span>
</p>




<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=cfd33915&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZoYucubyXbREDqybBl4Ue4JIY16h7hTZgEURYbfPnfiasc19zbRomXMw%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<div data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="margin-bottom: 24px;" data-pm-slice="0 0 []"><blockquote style="margin-top: 20px;margin-bottom: 20px;margin-left: 0px;margin-right: 0px;padding-top: 10px;padding-bottom: 10px;padding-left: 20px;padding-right: 10px;border-top-style: none;border-bottom-style: none;border-left-style: solid;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgb(239, 112, 96);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 249, 249);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;display: block;overflow-x: auto;overflow-y: auto;"><span style="display: none;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.5em;letter-spacing: 0px;text-align: left;font-weight: normal;"></span><p style="text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0px;text-align: left;font-weight: normal;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">公众号：尤而小屋</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">编辑：Peter</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">作者：Peter</span></span></p></blockquote><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">大家好，我是Peter~</span></span></p><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">图像基础处理是</span></span><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">计算机视觉</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;">和</span></span><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">数字图像处理</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;">的第一步，旨在通过简单而有效的操作改善图像质量或提取关键信息。</span></span></p><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">常见的处理技术包括：</span></span></p><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">灰度化（将彩色图像转换为单通道灰度图）</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">二值化（通过阈值分割突出目标区域）</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">平滑滤波（如高斯模糊去除噪声）</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">边缘检测（如</span></span><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">Sobel、Canny</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;">算子提取轮廓）</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">几何变换（如旋转、缩放、裁剪）。</span></span></p></li></ul><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">这些方法通常基于像素级操作或卷积运算，能够快速优化图像数据，为后续高级分析（如目标识别、特征匹配）奠定基础。</span></span></p><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">例如，</span></span><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">直方图均衡化可增强低对比度图像的细节，而形态学操作（如腐蚀、膨胀）能优化二值图像中的连通区域</span></span></strong><span leaf=""><span textstyle="" style="font-size: 15px;">。基础处理技术因其高效性和广泛适用性，在工业检测、医学影像、安防监控等领域发挥着重要作用。</span></span></p><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">本文给大家介绍10个图像处理的基本操作，所有的操作都是基于</span></span><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">Numpy</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;">实现，</span></span><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">用个人本地图片代码复制即可运行</span></span></strong><span leaf=""><span textstyle="" style="font-size: 15px;">。</span></span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">import</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> numpy </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">as</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> np</span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">import</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> matplotlib.pyplot </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">as</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> plt</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">%matplotlib inline</span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">from</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> PIL </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">import</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> Image</span></span></code></pre><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;">图像基础操作</span></span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span></span></h2><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf=""><span textstyle="" style="font-size: 15px;">读取图像</span></span></span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">首先读取我们需要处理的图像:</span></span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf=""><span textstyle="" style="font-size: 15px;">img = Image.open(</span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#34;Mona_Lisa.jpg&#34;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">type(img)</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">PIL.JpegImagePlugin.JpegImageFile</span></span></code></pre><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 创建矩阵</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">M = np.array(img)</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">type(M)  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># numpy数组</span></span></span></code></pre><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">结果显示是：</span></span></p><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">numpy.ndarray</span></span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf=""><span textstyle="" style="font-size: 15px;">M[:</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">2</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">]</span></span></code></pre><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf=""><span textstyle="" style="font-size: 15px;">array([[[ </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">99</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">110</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">93</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">],</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        [ </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">85</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">98</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">80</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">],</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        [ </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">80</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">95</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">76</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">],</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        ...,</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        [ </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">76</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">90</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">65</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">],</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        [ </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">73</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">82</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">63</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">],</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        [ </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">92</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">96</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">82</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">]],</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">       [[</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">101</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">113</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">93</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">],</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        [ </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">93</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">106</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">86</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">],</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        [ </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">78</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">93</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">72</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">],</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        ...,</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        [ </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">60</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">74</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">49</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">],</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        [ </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">64</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">73</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">54</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">],</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        [ </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">58</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">62</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,  </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">48</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">]]], dtype=uint8)</span></span></code></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf=""><span textstyle="" style="font-size: 15px;">图像基本信息</span></span></span><span style="display: none;"></span></h3><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf=""><span textstyle="" style="font-size: 15px;">M.shape  </span></span></code></pre><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">(447, 300, 3)</span></span></p><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">可以看到该创建的是一个三维矩阵，表示图像的高度、宽度和颜色通道数</span></span></p><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">height</span></span></strong><span leaf=""><span textstyle="" style="font-size: 15px;">：图像的高度（垂直方向的像素行数）。</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">width</span></span></strong><span leaf=""><span textstyle="" style="font-size: 15px;">：图像的宽度（水平方向的像素列数）。</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">channels</span></span></strong><span leaf=""><span textstyle="" style="font-size: 15px;">：颜色通道数（如RGB图像为3，灰度图像为1）。</span></span></p></li></ul><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf=""><span textstyle="" style="font-size: 15px;">M.size  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 图像大小  447*300*3</span></span></span></code></pre><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">402300</span></span></p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf=""><span textstyle="" style="font-size: 15px;">显示图像</span></span></span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">方式1：通过show函数显示</span></span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># img.show() # 方式1：新建窗口打开图片</span></span></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="100081838" data-ratio="1.49" style="display: block;margin: 0px auto;max-width: 100%;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;height: auto !important;" data-type="png" data-w="300" src="https://wechat2rss.xlab.app/img-proxy/?k=038480fe&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZvwibR1BsR2MqTnSBCTO92tcoPDRuq9kgUm3CSTnsxRUL1sYic3mwjXhA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">方式2：通过display函数显示该图像：</span></span><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">Image.fromarray()</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;">是图像处理库</span></span><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">Pillow (PIL)</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;"> 中的一个核心方法，其作用是将 </span></span><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">NumPy</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;"> 数组转换为 </span></span><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">PIL</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;"> 的 </span></span><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">Image</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;"> 对象</span></span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf=""><span textstyle="" style="font-size: 15px;">display(Image.fromarray(M))  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 将numpy数组转成Image对象</span></span></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img data-imgfileid="100081836" class="rich_pages wxw-img" data-ratio="1.49" data-type="png" data-w="300" style="display: block;margin: 0px auto;max-width: 100%;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=038480fe&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZvwibR1BsR2MqTnSBCTO92tcoPDRuq9kgUm3CSTnsxRUL1sYic3mwjXhA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">或者直接使用img，因为通过读取进行本身就是Image对象中的JpegImageFile类型。</span></span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf=""><span textstyle="" style="font-size: 15px;">type(img)</span></span></code></pre><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">PIL.JpegImagePlugin.JpegImageFile</span></span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf=""><span textstyle="" style="font-size: 15px;">display(img)</span></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="100081837" data-ratio="1.49" style="display: block;margin: 0px auto;max-width: 100%;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;height: auto !important;" data-type="png" data-w="300" src="https://wechat2rss.xlab.app/img-proxy/?k=038480fe&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZvwibR1BsR2MqTnSBCTO92tcoPDRuq9kgUm3CSTnsxRUL1sYic3mwjXhA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;">缩小图像</span></span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span></span></h2><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">def</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span><span style="color: #61aeee;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">reduce_img_size</span></span></span><span style="line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">(img, n)</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">:</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    h,w,c = img.shape  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># h---height   w---width   c---channel</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 将图像缩小n倍；得到缩小后的高度和宽度</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    new_h = h // n  </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    new_w = w // n</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 创建一个新矩阵来存储缩小后的图像</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    new_img = np.zeros((new_h,new_w,c), dtype=img.dtype) </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 保持和原图像相同的dtype</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">for</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> i </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">in</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> range(new_h):</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">for</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> j </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">in</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> range(new_w): </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 遍历每个像素位置(i,j)</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">            new_img[i,j] = img[n*i, n*j]  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 新图像的每个像素 (i, j)，从原图像中取位置为 (n*i, n*j) 的像素值赋值给它</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">return</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> new_img</span></span></code></pre><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf=""><span textstyle="" style="font-size: 15px;">reduced_M = reduce_img_size(M,</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">2</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 缩小为原来一半</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">display(Image.fromarray(reduced_M))</span></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="100081839" data-ratio="1.4866666666666666" style="display: block;margin: 0px auto;max-width: 100%;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;height: auto !important;" data-type="png" data-w="150" src="https://wechat2rss.xlab.app/img-proxy/?k=fb30e3f7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZMPDwmaLGPKoHpSHsBn10enbPkL9K7KibXFNnKEGJHL0sXIUQOAlcnUQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;">图像亮度调整Image Brightness Adjustment</span></span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span></span></h2><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf=""><span textstyle="" style="font-size: 15px;">基本原理</span></span></span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">基本原理：图像亮度调整的原理是通过数学运算改变图像像素的强度值（即亮度），从而整体提亮或压暗图像。</span></span></p><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">其核心是对每个像素的RGB（或灰度）通道值进行线性或非线性变换，同时确保结果在有效范围内（如0~255）。</span></span></p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf=""><span textstyle="" style="font-size: 15px;">案例</span></span></span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">np.clip()</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;"> 是</span></span><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">NumPy</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;"> 中的一个重要函数，用于限制数组值的范围，将超出指定范围的值截断到边界值。它在图像处理中常用于防止像素值溢出或归一化数据。</span></span></p><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">具体用法为：</span></span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf=""><span textstyle="" style="font-size: 15px;">np.clip(array, min, max, out=</span></span><span style="color: #56b6c2;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">None</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)</span></span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">array</span></span></strong><span leaf=""><span textstyle="" style="font-size: 15px;">: 输入数组（可以是 NumPy 数组或类似数组的对象）。</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">min</span></span></strong><span leaf=""><span textstyle="" style="font-size: 15px;">: 最小值，所有比 min 小的值会被替换为 min（可选，默认为 None）。</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">max</span></span></strong><span leaf=""><span textstyle="" style="font-size: 15px;">: 最大值，所有比 max 大的值会被替换为 max（可选，默认为 None）。</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">out</span></span></strong><span leaf=""><span textstyle="" style="font-size: 15px;">: 可选参数，指定输出数组（避免创建新数组）。</span></span></p></li></ul><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 增加亮度</span></span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 原数组M 乘以1.5，即扩大50%，然后将值限制在0~255；并转成标准np.uint格式</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">brightened_M = np.clip(M * </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">1.5</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">255</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">).astype(np.uint8)  </span></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="100081840" data-ratio="1.49" style="display: block;margin: 0px auto;max-width: 100%;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;height: auto !important;" data-type="png" data-w="300" src="https://wechat2rss.xlab.app/img-proxy/?k=3cf5e983&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZuZ3HfzFO9a9kFMh3x39y4VrhpN5TbUbnCZt2uDxEqCmgibwCRHcE68A%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf=""><span textstyle="" style="font-size: 15px;">display(Image.fromarray(brightened_M))</span></span></code></pre><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 降低亮度</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">darkened_M = np.clip(M * </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0.5</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">255</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">).astype(np.uint8)  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 亮度降低50%</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">display(Image.fromarray(darkened_M))</span></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="100081845" data-ratio="1.49" style="display: block;margin: 0px auto;max-width: 100%;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;height: auto !important;" data-type="png" data-w="300" src="https://wechat2rss.xlab.app/img-proxy/?k=df9427c7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZB13lDy4VH3DiaqqXov38IxqtYXtSAic9TOgiaakdqxho9UtBByMXWpKtw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;">图像翻转Image Flipping</span></span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span></span></h2><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">Horizontal水平翻转即沿 垂直轴（Y轴） 翻转图像，相当于对图像的 列（width） 进行逆序排列。</span></span></p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">Vertical垂直翻转即沿 水平轴（X轴） 翻转图像，相当于对图像的 行（height） 进行逆序排列</span></span></p></div></li></ul><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">NumPy 的切片操作是 零拷贝（view），速度极快，适合大规模图像处理</span></span></strong></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 方式1</span></span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 水平翻转（左右镜像）</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">flipped_horizontal = M[:, ::</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">-1</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, :]</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 垂直翻转（上下镜像）</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">flipped_vertical = M[::</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">-1</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, :, :]</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 显示结果</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">plt.figure(figsize=(</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">12</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">4</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">))</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">plt.subplot(</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">131</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">), plt.imshow(img), plt.title(</span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#34;Original&#34;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">), plt.axis(</span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#39;off&#39;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">plt.subplot(</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">132</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">), plt.imshow(flipped_horizontal), plt.title(</span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#34;Horizontal Flip&#34;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">), plt.axis(</span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#39;off&#39;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">plt.subplot(</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">133</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">), plt.imshow(flipped_vertical), plt.title(</span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#34;Vertical Flip&#34;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">), plt.axis(</span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#39;off&#39;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">plt.show()</span></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img data-imgfileid="100081842" class="rich_pages wxw-img" data-ratio="0.3941109852774632" data-type="png" data-w="883" style="display: block;margin: 0px auto;max-width: 100%;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=4f5b131e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZ6ltd4UPson0CueQJRDsekHdv0Ee9TwgBia8SEw136Ry86Drdnm55KZA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 方式2</span></span></span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">def</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span><span style="color: #61aeee;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">flip_image</span></span></span><span style="line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">(image)</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">:</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 水平翻转函数</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    flip_image = image[:, ::</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">-1</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">]</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">return</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> flip_image</span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">def</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span><span style="color: #61aeee;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">rotate_image</span></span></span><span style="line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">(image)</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">:</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 垂直翻转函数</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    rotated_img = Image.fromarray(np.rot90(image, k=n, axes=(</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">1</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">))) </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">return</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> rotated_img</span></span></code></pre><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">其中</span></span><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">np.rot90</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;">为内置的矩阵旋转函数，其中：</span></span></p><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">k=n</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;">：表示旋转次数(90°*n)</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">axes=(1, 0)</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;">：指定旋转的轴平面（(1, 0) 表示沿高度（行）和宽度（列）组成的平面旋转，即顺时针旋转）。</span></span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;">图像裁剪Image Cropping</span></span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span></span></h2><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 定义裁剪函数</span></span></span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">def</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span><span style="color: #61aeee;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">crop_image</span></span></span><span style="line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">(image, crop_ratio, zoom_ratio)</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">:</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#34;&#34;&#34;</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    image：待裁剪的函数，(h,w,c)三个参数</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    crop_ratio：裁剪比例，控制裁剪范围的中心位置</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    zoom_ratio：缩放比例，控制裁剪后区域的放大倍数</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    &#34;&#34;&#34;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 获取图像的高度shape[0]、宽度shape[1]和通道数shape[2]</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># top：从图像顶部向下裁剪 1/crop_ratio 的部分（例如 crop_ratio=4 表示从 25% 高度处开始裁剪）</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># bottom：在 top 的基础上，放大 zoom_ratio 倍（例如 zoom_ratio=2 表示裁剪区域高度为原图的 2/crop_ratio）</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    top = image.shape[</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">] // crop_ratio</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    bottom = zoom_ratio * image.shape[</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">] // crop_ratio</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    left = image.shape[</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">1</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">] // crop_ratio</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    right = zoom_ratio * image.shape[</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">1</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">] // crop_ratio</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    focused_img = image[top:bottom, left:right]</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">return</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> focused_img</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">display(Image.fromarray(crop_image(M, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">3</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">5</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)))</span></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img data-imgfileid="100081841" class="rich_pages wxw-img" data-ratio="1.49" data-type="png" data-w="200" style="display: block;margin: 0px auto;max-width: 100%;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;height: auto !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=2ea532d6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZ0POLmSYcoIiavdGDNHm4K1Kqbg0RHic2fLsho1RUfZpOqLDKF19Nmh6Q%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;">RGB通道</span></span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span></span></h2><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf=""><span textstyle="" style="font-size: 15px;">RGB简介</span></span></span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">RGB（Red, Green, Blue）</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;">是一种颜色模型，通过 </span></span><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">红（R）、绿（G）、蓝（B）</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;"> 三个颜色通道的组合来表示所有颜色。它是数字图像处理中最常用的色彩模式，适用于显示器、摄像头、照片等。</span></span></p><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">RGB通道的作用：</span></span></p><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">红色（R）：控制图像中的红色分量。</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">绿色（G）：控制图像中的绿色分量。</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">蓝色（B）：控制图像中的蓝色分量。</span></span></p></li></ul><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">通过调整这三个通道的强度（0-255），可以混合出 1677万种（256×256×256） 颜色。</span></span></p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf=""><span textstyle="" style="font-size: 15px;">RGB通道的顺序</span></span></span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">RGB 通道的顺序取决于使用的库或工具：</span></span></p><p data-tool="mdnice编辑器" style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;overflow-x: auto;"><table style="display: table;text-align: left;"><thead><tr><th style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;"><p><span leaf=""><span textstyle="" style="font-size: 15px;">库/工具</span></span></p></th><th style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;"><p><span leaf=""><span textstyle="" style="font-size: 15px;">通道顺序</span></span></p></th><th style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;background: none 0% 0% / auto no-repeat scroll padding-box border-box rgb(240, 240, 240);height: auto;border-style: solid;border-width: 1px;border-color: rgba(204, 204, 204, 0.4);border-radius: 0px;padding: 5px 10px;min-width: 85px;"><p><span leaf=""><span textstyle="" style="font-size: 15px;">示例（</span></span><code><span leaf=""><span textstyle="" style="font-size: 15px;">image.shape = (H, W, 3)</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;">）</span></span></p></th></tr></thead><tbody><tr style="color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 255, 255);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;"><td style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">PIL/Pillow、Matplotlib</span></span></strong></td><td style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">RGB</span></span></strong></td><td style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><code><span leaf=""><span textstyle="" style="font-size: 15px;">image[:, :, 0]</span></span></code><p><span leaf=""><span textstyle="" style="font-size: 15px;"> = 红（R）</span></span><code><span leaf=""><span textstyle="" style="font-size: 15px;">image[:, :, 1]</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;"> = 绿（G）</span></span><code><span leaf=""><span textstyle="" style="font-size: 15px;">image[:, :, 2]</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;"> = 蓝（B）</span></span></p></td></tr><tr style="color: rgb(0, 0, 0);background-attachment: scroll;background-clip: border-box;background-color: rgb(248, 248, 248);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;"><td style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">OpenCV</span></span></strong></td><td style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">BGR</span></span></strong></td><td style="padding-top: 5px;padding-right: 10px;padding-bottom: 5px;padding-left: 10px;min-width: 85px;border-top-style: solid;border-bottom-style: solid;border-left-style: solid;border-right-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgba(204, 204, 204, 0.4);border-bottom-color: rgba(204, 204, 204, 0.4);border-left-color: rgba(204, 204, 204, 0.4);border-right-color: rgba(204, 204, 204, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><code><span leaf=""><span textstyle="" style="font-size: 15px;">image[:, :, 0]</span></span></code><p><span leaf=""><span textstyle="" style="font-size: 15px;"> = 蓝（B）</span></span><code><span leaf=""><span textstyle="" style="font-size: 15px;">image[:, :, 1]</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;"> = 绿（G）</span></span><code><span leaf=""><span textstyle="" style="font-size: 15px;">image[:, :, 2]</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;"> = 红（R）</span></span></p></td></tr></tbody></table></p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf=""><span textstyle="" style="font-size: 15px;">提取指定通道</span></span></span><span style="display: none;"></span></h3><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 提取 R、G、B 通道（注意通道顺序是 R=0, G=1, B=2）</span></span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 指定提取单个通道的数据</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">red_channel = M[:, :, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">]    </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 红色通道（二维数组）</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">green_channel = M[:, :, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">1</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">]  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 绿色通道</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">blue_channel = M[:, :, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">2</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">]   </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 蓝色通道</span></span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 显示单通道（灰度图）</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">plt.figure(figsize=(</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">12</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">4</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">))</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">plt.subplot(</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">131</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">), plt.imshow(red_channel, cmap=</span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#39;Reds&#39;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">), plt.title(</span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#34;Red Channel&#34;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">plt.subplot(</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">132</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">), plt.imshow(green_channel, cmap=</span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#39;Greens&#39;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">), plt.title(</span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#34;Green Channel&#34;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">plt.subplot(</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">133</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">), plt.imshow(blue_channel, cmap=</span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#39;Blues&#39;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">), plt.title(</span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#34;Blue Channel&#34;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">plt.show()</span></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="100081844" data-ratio="0.4047878128400435" style="display: block;margin: 0px auto;max-width: 100%;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;height: auto !important;" data-type="png" data-w="919" src="https://wechat2rss.xlab.app/img-proxy/?k=6ac1fd33&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZV3N78C2jicDibzvH3xY4XxeEMdicg2JFSgWvf9XmdVL4rx38Xiah0icXv6g%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">另外一种方式：定义提取单个通道的函数</span></span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">def</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span><span style="color: #61aeee;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">RGB_image</span></span></span><span style="line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">(image,image_color)</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">:</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#34;&#34;&#34;</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    定义RGB函数：提取图像的红-绿-蓝色的单色通道，并将其他两个通道置为零</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    通道顺序：R=0, G=1, B=2</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    &#34;&#34;&#34;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">if</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> image_color == </span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#39;R&#39;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">:</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        img_R = image.copy()</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        img_R[:, :, (</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">1</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">2</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)] = </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0</span></span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 保留 R，G 和 B 置零</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">return</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> img_R</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">elif</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> image_color == </span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#39;G&#39;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">:</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        img_G = image.copy()</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        img_G[:, :, (</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">2</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)] = </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0</span></span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 保留 G，R 和 B 置零</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">return</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> img_G</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">elif</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> image_color == </span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#39;B&#39;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">:</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        img_B = image.copy()</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        img_B[:, :, (</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">1</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)] = </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">   </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 保留 B，R 和 G 置零</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">return</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> img_B</span></span></code></pre><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf=""><span textstyle="" style="font-size: 15px;">M_red = Image.fromarray(RGB_image(M, </span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#39;R&#39;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">))</span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">display(M_red)</span></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="100081843" data-ratio="1.49" style="display: block;margin: 0px auto;max-width: 100%;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;height: auto !important;" data-type="png" data-w="300" src="https://wechat2rss.xlab.app/img-proxy/?k=ef119470&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZjvJb7QAMib5icQnyCGFTBs8DjCZUUksMMdIDmQRiclPxqCI6mX1lbRibbA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;">图片灰度化Image Grayscaling</span></span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">图片灰度化是将彩色图像转换为灰度图像的过程，也就是将包含丰富颜色信息的图像转换为仅包含亮度信息的黑白图像（实际上是不同深浅的灰色）。</span></span></p><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">基本原理</span></span></strong><span leaf=""><span textstyle="" style="font-size: 15px;">：灰度化通过数学转换将彩色图像（通常由红、绿、蓝三个通道组成）转换为单通道的灰度图像，其中每个像素的值代表该点的亮度。</span></span></p><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">常用的灰度化方法</span></span></strong><span leaf=""><span textstyle="" style="font-size: 15px;">：</span></span></p><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">平均值灰度法：</span></span><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">(R+G+B)/3</span></span></code></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">加权平均灰度法：</span></span><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">0.5*R+0.3*G+0.2*B</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;">；OpenCV等库采用</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">最大值/最小值灰度法：</span></span><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">max(R,G,B)</span></span></code><span leaf=""><span textstyle="" style="font-size: 15px;">,</span></span><code style=""><span leaf=""><span textstyle="" style="font-size: 15px;">min(R,G,B)</span></span></code></p></li></ul><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">def</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span><span style="color: #61aeee;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">grayscale_image</span></span></span><span style="line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">(image)</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">:</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#34;&#34;&#34;</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    定义加权平均灰度函数</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    输入：图像数组np.array</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    &#34;&#34;&#34;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    grayscale_image = np.dot(image[...,:</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">3</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">], [</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0.5</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0.3</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0.2</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">])  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 选取RGB通道，忽略可能的alpha通道；自定义加权系数</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    grayscale_image = np.clip(grayscale_image,</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">255</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 将像素值限制在0-255内，防止计算溢出</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    grayscale_image = grayscale_image.astype(np.uint8) </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># # 转换数据类型为np.uint8；标准图像格式</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">return</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> grayscale_image</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 执行灰度转换功能</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">M_gray = grayscale_image(M)</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">display(Image.fromarray(M_gray))</span></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="100081849" data-ratio="1.49" style="display: block;margin: 0px auto;max-width: 100%;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;height: auto !important;" data-type="png" data-w="300" src="https://wechat2rss.xlab.app/img-proxy/?k=15ee22ae&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZ9icQtJ7RMjz5EuSObokfqibpQIWNCIshsW5icGwUOxlJYZ2KF79G3iaNDw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;">图片添加滤镜Image Filter</span></span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">图像滤镜（Image Filter）的本质：</span></span></p><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">给图像添加滤镜，本质上是通过数学运算改变像素的颜色值，从而让图像呈现出特定的视觉效果。</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">滤镜可以模拟自然现象（如老照片）、艺术风格（如油画），或其他的创意表达。</span></span></p></li></ul><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">def</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span><span style="color: #61aeee;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">apply_sepia</span></span></span><span style="line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">(image)</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">:</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#34;&#34;&#34;</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    &#34;&#34;&#34;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    sepia_matrix = np.array([[</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0.493</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0.769</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0.189</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">],  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 红色通道转换系数</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">                          [</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0.349</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0.686</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0.168</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">],  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 绿色</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">                          [</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0.282</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0.434</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0.431</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">]]) </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 蓝色</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    sepia_img = image.dot(sepia_matrix.T)  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># .dot  执行矩阵乘法</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    sepia_img = np.clip(sepia_img, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">, </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">255</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">return</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> sepia_img.astype(np.uint8) </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">M_sepia = Image.fromarray(apply_sepia(M))</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">display(M_sepia)</span></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="100081848" data-ratio="1.49" style="display: block;margin: 0px auto;max-width: 100%;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;height: auto !important;" data-type="png" data-w="300" src="https://wechat2rss.xlab.app/img-proxy/?k=b6d9f8fe&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZm9S7coHLiaZlnibL7pD73qosWYG3sODuyEyMl9WicicsBZu62oA9Sx0qAA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;">图片像素化Image Pixelation</span></span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">图像像素化是一种通过减少图像分辨率或合并相邻像素来创建块状、马赛克效果的图像处理技术。它通过将图像分割为若干个小方块（像素块），并用每个方块内像素的</span></span><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">平均颜色值</span></span></strong><span leaf=""><span textstyle="" style="font-size: 15px;">替换该区域的所有像素来实现。</span></span></p><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">简单来说,就是把矢量图形转换成像素点组成的点阵图形，也叫</span></span><strong style="color: rgb(0, 0, 0);font-weight: bold;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">栅格化</span></span></strong><span leaf=""><span textstyle="" style="font-size: 15px;">。</span></span></p><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf=""><span textstyle="" style="font-size: 15px;">基本原理</span></span></span><span style="display: none;"></span></h3><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">分块处理：将图像划分为N×N的方块网格</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">颜色平均：计算每个方块内所有像素的颜色平均值</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">替换像素：用该平均值替换方块内所有像素</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">效果控制：通过调整方块大小控制像素化程度</span></span></p></li></ul><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf=""><span textstyle="" style="font-size: 15px;">案例</span></span></span><span style="display: none;"></span></h3><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">def</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span><span style="color: #61aeee;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">pixelate_image</span></span></span><span style="line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">(image,block_size)</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">:</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#34;&#34;&#34;</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    image：待处理图片</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    block_size：每个像素化方块的大小，比如block_size=10表示10*10的像素</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    &#34;&#34;&#34;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 计算每个维度的所需分块数</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    num_blocks_x = image.shape[</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">1</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">] // block_size  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># //表示整除计算</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    num_blocks_y = image.shape[</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">] // block_size</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 计算每个方块的平均颜色值</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    block_means = np.zeros((num_blocks_y,num_blocks_x,</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">3</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">), dtype=np.uint8)  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 零矩阵用于存储数据</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">for</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> y </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">in</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> range(num_blocks_y):</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">        </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">for</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> x </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">in</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> range(num_blocks_x):</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">            </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 提取当前方块</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">            block = image[y * block_size:(y+</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">1</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">) * block_size, x * block_size:(x+</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">1</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">) * block_size]</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">            </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 计算方块内RGB三通道均值</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">            block_mean = np.mean(block, axis=(</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">1</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">))</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">            </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 将均值从浮点数转为 uint8（0~255的整数）</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">            block_means[y,x] = block_mean.astype(np.uint8) </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">            </span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 扩展均值块生成像素化图像：垂直和水平方向使用两次       </span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    pixelated_image = np.repeat(np.repeat(block_means, block_size, axis=</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">), block_size, axis=</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">1</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">return</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> pixelated_image  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 生成的是图像数组</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">M_pixelated = Image.fromarray(pixelate_image(M,block_size=</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">10</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">))</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">display(M_pixelated)</span></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="100081846" data-ratio="1.4666666666666666" style="display: block;margin: 0px auto;max-width: 100%;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;height: auto !important;" data-type="png" data-w="300" src="https://wechat2rss.xlab.app/img-proxy/?k=108dd82f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZYHRznOjBdQLfw87HMLxayEbYOgNeuKZ0J4fsuVtXQ70ygPVOC8BA6Q%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;">图像二值化Image Binarization</span></span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">图像二值化（Image Binarization）是将灰度图像转换为仅包含黑白两色的图像处理技术，通过设定一个阈值将像素分为前景（通常为白色）和背景（通常为黑色）。</span></span></p><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">二值化基本原理：</span></span></p><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">选择一个灰度值作为分界点（0-255之间）</span></span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf=""><span textstyle="" style="font-size: 15px;">大于阈值的像素设为白色（255），小于等于阈值的像素设为黑色（0）</span></span></p></li></ul><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">def</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span><span style="color: #61aeee;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">binarize_image</span></span></span><span style="line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">(image,threshold)</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">:</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    binarize_image = (image &gt; threshold) * </span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">255</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    binarize_image = binarize_image.astype(np.uint8)  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 转成标准格式</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">return</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> binarize_image  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 数组格式</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">M_binarized = Image.fromarray(binarize_image(M,threshold=</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">100</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">))  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 数组---转成</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">display((M_binarized))</span></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="100081847" data-ratio="1.49" style="display: block;margin: 0px auto;max-width: 100%;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;height: auto !important;" data-type="png" data-w="300" src="https://wechat2rss.xlab.app/img-proxy/?k=638a2df1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZm0ClBERTgJr4aiaSP40ia5tePiaKC0icNhnWL5PlgURt5ic6PWR2GnQf1wg%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;">图像融合Image Blending</span></span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat-x: no-repeat;background-repeat-y: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><span textstyle="" style="font-size: 15px;">图像融合是指根据两种图片的透明度将二者的像素进行叠加求和的过程。</span></span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 读取第二张图</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">img2 = Image.open(</span></span><span style="color: #98c379;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">&#34;cat.jpg&#34;</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">)</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 尺寸转换，和第一张图M的相同</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">img2 = img2.resize(M.shape[</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">1</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">::</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">-1</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">])</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 创建矩阵</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">M2 = np.array(img2)</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">display(Image.fromarray(M2))</span></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="100081850" data-ratio="1.49" style="display: block;margin: 0px auto;max-width: 100%;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;height: auto !important;" data-type="png" data-w="300" src="https://wechat2rss.xlab.app/img-proxy/?k=ca68ebe0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZib5zkV68ou556g2lI6mKibyW4IDGbVwJhHzDvcicgK0kNn8ett98tLwzw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">def</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> </span></span><span style="color: #61aeee;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">blend_image</span></span></span><span style="line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">(image1,image2,visibility1,visibility2)</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">:</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    blend_image = image1 * visibility1 + image2 * visibility2 </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 根据两个权重进行叠加</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    blend_image = blend_image.astype(np.uint8)  </span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;"># 标准格式</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">    </span></span><span style="color: #c678dd;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">return</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;"> blend_image</span></span></code></pre><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/AbruuZ3ILCkb0SPNc57pWliaubJltlbwVR7ABgV5UiaiaWibeqYPGCokw0rwaicrMZDoW4SpkOuBIuAwlqEn76pPiakdpPuUfqyw4u/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf=""><span textstyle="" style="font-size: 15px;">blended_image = Image.fromarray(blend_image(M,M2,</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0.6</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">,</span></span><span style="color: #d19a66;line-height: 26px;"><span leaf=""><span textstyle="" style="font-size: 15px;">0.4</span></span></span><span leaf=""><span textstyle="" style="font-size: 15px;">))</span></span><span leaf=""><span textstyle="" style="font-size: 15px;">display(blended_image)</span></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="100081855" data-ratio="1.49" style="display: block;margin: 0px auto;max-width: 100%;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;height: auto !important;" data-type="png" data-w="300" src="https://wechat2rss.xlab.app/img-proxy/?k=be4e4309&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQeT5ql1LaZuOo4mMoB3YJ7mv9w90uCNZf3jRZxEmshfTwfsJVnVdw1wl0yQbEcoKfRibKoE9GGb11KLtM78Rbww%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure></div><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247526320">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=8d6366bf&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526320%26idx%3D2%26sn%3D60b8423ed64f37a8569250a5577652ad">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sat, 16 Aug 2025 15:40:00 +0800</pubDate>
    </item>
    <item>
      <title>AI 论文周报丨微软/清华/香港大学等最新成果，一键解锁通用智能体/地理信息系统/机器人操作……领域新突破</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526320&amp;idx=3&amp;sn=99090df74e6047db3f4406b603b68b6d</link>
      <description>在通用智能体领域，AI 正从单一任务执行迈向具备推理、多模态交互与自主学习的综合能力，但现有强化学习训练方法</description>
      <content:encoded><![CDATA[<p>
<span>雾纪</span> <span>2025-08-16 15:40</span> <span style="display: inline-block;">浙江</span>
</p>




<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=f529b24f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FQkCvnz083AiaXlORnyembgn8MMiaibhlIbNJ88XptMOicsOjmXe3liay4pjGpnZW1STn4zA6az20vfeYu9IVJe4AJXg%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<div style="box-sizing: border-box;font-style: normal;font-weight: 400;text-align: justify;font-size: 16px;color: rgb(62, 62, 62);margin-bottom: 24px;" data-pm-slice="0 0 []"><div style="letter-spacing: 1px;padding: 0px 2px;font-size: 15px;color: rgb(0, 0, 0);box-sizing: border-box;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: justify;"><span leaf="">在通用智能体领域，AI 正从单一任务执行迈向具备推理、多模态交互与自主学习的综合能力，但现有强化学习训练方法常与代理执行机制紧密耦合、迁移困难，且对系统侵入性高。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: justify;"><span leaf="" style="font-style: normal;font-weight: 400;letter-spacing: 1px;font-size: 15px;color: rgb(0, 0, 0);box-sizing: border-box;text-align: justify;">Agent Lightning 框架应运而生，实现了训练与执行的完全解耦，几乎无需改动代码即可集成多种 Agent 架构，并通过统一接口与轨迹分解，将复杂交互转化为可训练数据，支持多场景下的灵活 RL 微调。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span style="color: rgb(255, 96, 150);box-sizing: border-box;"><span leaf="">论文链接</span></span></strong><span leaf="">：</span><em style="box-sizing: border-box;"><span leaf=""><a href="https://go.hyper.ai/se37P" target="_blank">https://go.hyper.ai/se37P</a></span></em></p><p><strong style="box-sizing: border-box;"><span style="color: rgb(255, 96, 150);box-sizing: border-box;"><span leaf="">最新 AI 论文</span></span></strong><span leaf="">：<span textstyle="" style="font-style: italic;"><a href="https://hyper.ai/cn/papers" target="_blank">https://hyper.ai/cn/papers</a></span></span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><span leaf="">为了让更多用户了解学术界在人工智能领域的最新动态，HyperAI超神经官网（hyper.ai）现已上线「最新论文」板块，每天都会更新 AI 前沿研究论文。</span><span style="color: rgb(255, 96, 150);box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">以下是我们为大家推荐的 5 篇热门 AI 论文</span></strong></span><span leaf="">，同时我们还为大家总结了论文架构的思维导图，一起来速览本周 AI 前沿成果吧 ⬇️</span></p></div><div style="text-align: center;justify-content: center;display: flex;flex-flow: row;margin: 10px 0px;box-sizing: border-box;"><div style="display: inline-block;width: auto;vertical-align: top;align-self: flex-start;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;padding: 0px 20px;margin: 0px 20px;box-sizing: border-box;"><div style="display: flex;width: 100%;flex-flow: column;box-sizing: border-box;"><div style="z-index: 1;box-sizing: border-box;"><div style="margin: 2px 0px -2px;box-sizing: border-box;"><div style="color: rgb(0, 0, 0);padding: 0px 11px;font-size: 17px;box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><span style="box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">本周论文推荐</span></strong></span></p></div></div></div></div></div></div><div style="text-align: left;justify-content: flex-start;display: flex;flex-flow: row;margin: 10px 0px;box-sizing: border-box;"><div style="display: inline-block;width: 100%;vertical-align: top;align-self: flex-start;flex: 0 0 auto;background-color: rgb(255, 229, 241);box-sizing: border-box;"><div style="justify-content: flex-start;display: flex;flex-flow: row;margin: 0px;box-sizing: border-box;"><div style="display: inline-block;vertical-align: middle;width: 38px;align-self: center;flex: 0 0 auto;background-color: rgb(255, 96, 150);height: auto;padding: 0px;transform-style: preserve-3d;perspective: 50px;box-sizing: border-box;"><div style="transform: rotateY(23deg) translateZ(5px);-webkit-transform: rotateY(23deg) translateZ(5px);-moz-transform: rotateY(23deg) translateZ(5px);-o-transform: rotateY(23deg) translateZ(5px);box-sizing: border-box;"><div style="display: flex;width: 100%;flex-flow: column;box-sizing: border-box;"><div style="margin-top: 0px;margin-bottom: 0px;z-index: auto;box-sizing: border-box;"><div style="text-align: center;justify-content: center;display: flex;flex-flow: row;margin: 3px 0px;transform: translate3d(-5px, 0px, 0px);-webkit-transform: translate3d(-5px, 0px, 0px);-moz-transform: translate3d(-5px, 0px, 0px);-o-transform: translate3d(-5px, 0px, 0px);box-sizing: border-box;"><div style="display: inline-block;width: 100%;vertical-align: top;align-self: flex-start;flex: 0 0 auto;background-color: rgb(255, 255, 255);padding: 0px 10px 0px 12px;margin: 0px;box-sizing: border-box;"><div style="margin: 1px 0px;box-sizing: border-box;"><div style="color: rgb(196, 52, 101);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">1</span></strong></p></div></div></div></div></div></div></div></div><div style="display: inline-block;vertical-align: middle;width: auto;min-width: 5%;max-width: 100%;flex: 0 0 auto;height: auto;align-self: center;padding: 0px 12px 0px 13px;margin: 0px;box-sizing: border-box;"><div style="margin: 0px;box-sizing: border-box;"><div style="color: rgb(196, 52, 101);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">Agent Lightning: Train ANY </span></strong></p><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">AI Agents with Reinforcement </span></strong></p><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">Learning</span></strong></p></div></div></div></div></div></div><div style="font-size: 15px;letter-spacing: 1px;padding: 0px 2px;box-sizing: border-box;"><p style="letter-spacing: 1px;font-size: 15px;color: rgb(0, 0, 0);white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: justify;"><span leaf="">本文提出了一个灵活且可扩展的框架 Agent Lightning，可对任意 AI Agent 进行基于强化学习的大语言模型训练。与现有方法将 RL 训练与 Agent 紧密耦合，或依赖带掩码的序列拼接不同，Agent Lightning 实现了 Agent 执行与训练的完全解耦，能够无缝对接通过多种方式开发的现有 Agent，几乎无需修改任何代码。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><span style="color: rgb(163, 155, 155);box-sizing: border-box;"><strong style="box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"><span leaf="">论文链接</span></span></strong><strong style="box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"><span leaf="">：</span></span></strong><em style="box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"><span leaf=""><a href="https://go.hyper.ai/se37P" target="_blank">https://go.hyper.ai/se37P</a></span></span></em></span></p></div><div style="text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;box-sizing: border-box;"><p style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;text-align: center;" nodeleaf=""><img class="rich_pages wxw-img" data-backh="205" data-backw="578" data-imgfileid="100039419" data-ratio="0.35517693315858456" data-s="300,640" style="vertical-align:middle;max-width:100%;width:100%;box-sizing:border-box;" data-type="png" data-w="1526" src="https://wechat2rss.xlab.app/img-proxy/?k=52be9251&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQkCvnz083AiaXlORnyembgn8MMiaibhlIbNE5XhicC0scA11HnWINnLicpPKxic0V5QBIIRLOgAQaM93ibhnVFP3U7eSA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></p></div><div style="text-align: center;font-size: 12px;color: rgb(163, 155, 155);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">模型架构图</span></strong></p></div><div style="line-height: 0;box-sizing: border-box;"><p style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;text-align: center;" nodeleaf=""><img data-imgfileid="100039417" class="rich_pages wxw-img" data-ratio="0.31851851851851853" data-s="300,640" data-type="png" data-w="1080" style="vertical-align:middle;max-width:100%;width:100%;box-sizing:border-box;" data-backw="578" data-backh="184" src="https://wechat2rss.xlab.app/img-proxy/?k=c37c41bc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQkCvnz083AiaXlORnyembgn8MMiaibhlIbN4c3I4KX9AlbDEIhwCNvnYCX7rrOutQunEkzG2nJDXkMzYgRgLcKsCA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></p></div><div style="text-align: center;font-size: 12px;color: rgb(163, 155, 155);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">论文思维导图</span></strong></p></div><div style="text-align: left;justify-content: flex-start;display: flex;flex-flow: row;margin: 10px 0px;box-sizing: border-box;"><div style="display: inline-block;width: 100%;vertical-align: top;align-self: flex-start;flex: 0 0 auto;background-color: rgb(255, 229, 241);box-sizing: border-box;"><div style="justify-content: flex-start;display: flex;flex-flow: row;margin: 0px;box-sizing: border-box;"><div style="display: inline-block;vertical-align: middle;width: 38px;align-self: center;flex: 0 0 auto;background-color: rgb(255, 96, 150);height: auto;padding: 0px;transform-style: preserve-3d;perspective: 50px;box-sizing: border-box;"><div style="transform: rotateY(23deg) translateZ(5px);-webkit-transform: rotateY(23deg) translateZ(5px);-moz-transform: rotateY(23deg) translateZ(5px);-o-transform: rotateY(23deg) translateZ(5px);box-sizing: border-box;"><div style="display: flex;width: 100%;flex-flow: column;box-sizing: border-box;"><div style="margin-top: 0px;margin-bottom: 0px;z-index: auto;box-sizing: border-box;"><div style="text-align: center;justify-content: center;display: flex;flex-flow: row;margin: 3px 0px;transform: translate3d(-5px, 0px, 0px);-webkit-transform: translate3d(-5px, 0px, 0px);-moz-transform: translate3d(-5px, 0px, 0px);-o-transform: translate3d(-5px, 0px, 0px);box-sizing: border-box;"><div style="display: inline-block;width: 100%;vertical-align: top;align-self: flex-start;flex: 0 0 auto;background-color: rgb(255, 255, 255);padding: 0px 10px 0px 12px;margin: 0px;box-sizing: border-box;"><div style="margin: 1px 0px;box-sizing: border-box;"><div style="color: rgb(196, 52, 101);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">2</span></strong></p></div></div></div></div></div></div></div></div><div style="display: inline-block;vertical-align: middle;width: auto;min-width: 5%;max-width: 100%;flex: 0 0 auto;height: auto;align-self: center;padding: 0px 12px 0px 13px;margin: 0px;box-sizing: border-box;"><div style="margin: 0px;box-sizing: border-box;"><div style="color: rgb(196, 52, 101);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">AlphaEarth Foundations: An </span></strong></p><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">embedding </span></strong><strong style="box-sizing: border-box;"><span leaf="">field model for </span></strong></p><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">accurate </span></strong><strong style="box-sizing: border-box;"><span leaf="">and efficient </span></strong><strong style="box-sizing: border-box;"><span leaf="">global </span></strong></p><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">mapping from </span></strong><strong style="box-sizing: border-box;"><span leaf="">sparse label data</span></strong></p></div></div></div></div></div></div><div style="font-size: 15px;letter-spacing: 1px;padding: 0px 2px;color: rgb(163, 155, 155);box-sizing: border-box;"><p style="letter-spacing: 1px;font-size: 15px;color: rgb(0, 0, 0);white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: justify;"><span leaf="">本文介绍了一种名为 AlphaEarth Foundations 的地球观测数据处理模型，旨在从稀疏标注的数据中高效准确地生成全球地图和监测系统。该模型通过学习不同来源的空间、时间及测量数据之间的关系，生成一个通用的地理空间表示，从而在不重新训练的情况下，在一系列的地图评估任务中表现优于所有先前的特征化方法。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><span style="color: rgb(163, 155, 155);box-sizing: border-box;"><strong style="box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"><span leaf="">论文链接</span></span></strong><strong style="box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"><span leaf="">：</span></span></strong><em style="box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"><span leaf=""><a href="https://go.hyper.ai/HSPlS" target="_blank">https://go.hyper.ai/HSPlS</a></span></span></em></span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"><span leaf="">Satellite Embedding 地球观测数据集</span></span></strong><strong style="font-size: 14px;box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"><span leaf="">：</span></span></strong><em style="font-size: 14px;box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"><span leaf=""><a href="https://go.hyper.ai/WTpjt" target="_blank">https://go.hyper.ai/WTpjt</a></span><strong style="box-sizing: border-box;"></strong></span></em></p></div><div style="text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;box-sizing: border-box;"><p style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;text-align: center;" nodeleaf=""><img data-imgfileid="100039420" class="rich_pages wxw-img" data-ratio="1.197265625" data-s="300,640" data-type="png" data-w="1024" style="vertical-align:middle;max-width:100%;width:401px;box-sizing:border-box;height:480px;" data-backw="578" data-backh="692" src="https://wechat2rss.xlab.app/img-proxy/?k=59e5f388&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQkCvnz083AiaXlORnyembgn8MMiaibhlIbNaUsfkqHNl0jKqoDwMRkRHuykA2o1mMu7USoT31kvzFdvFICBV5I3jQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></p></div><div style="text-align: center;font-size: 12px;color: rgb(163, 155, 155);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">模型架构图</span></strong></p></div><div style="line-height: 0;box-sizing: border-box;"><p style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;text-align: center;" nodeleaf=""><img class="rich_pages wxw-img" data-backh="255" data-backw="578" data-imgfileid="100039418" data-ratio="0.44074074074074077" data-s="300,640" style="vertical-align:middle;max-width:100%;width:100%;box-sizing:border-box;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=ae73f4fa&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQkCvnz083AiaXlORnyembgn8MMiaibhlIbNicdlhzHLKuCE9To0qYAffHiamLDKrH4Hca23VibSiaibuYyagdbua4EkSmg%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></p></div><div style="text-align: center;font-size: 12px;color: rgb(163, 155, 155);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">论文思维导图</span></strong></p></div><div style="text-align: left;justify-content: flex-start;display: flex;flex-flow: row;margin: 10px 0px;box-sizing: border-box;"><div style="display: inline-block;width: 100%;vertical-align: top;align-self: flex-start;flex: 0 0 auto;background-color: rgb(255, 229, 241);box-sizing: border-box;"><div style="justify-content: flex-start;display: flex;flex-flow: row;margin: 0px;box-sizing: border-box;"><div style="display: inline-block;vertical-align: middle;width: 38px;align-self: center;flex: 0 0 auto;background-color: rgb(255, 96, 150);height: auto;padding: 0px;transform-style: preserve-3d;perspective: 50px;box-sizing: border-box;"><div style="transform: rotateY(23deg) translateZ(5px);-webkit-transform: rotateY(23deg) translateZ(5px);-moz-transform: rotateY(23deg) translateZ(5px);-o-transform: rotateY(23deg) translateZ(5px);box-sizing: border-box;"><div style="display: flex;width: 100%;flex-flow: column;box-sizing: border-box;"><div style="margin-top: 0px;margin-bottom: 0px;z-index: auto;box-sizing: border-box;"><div style="text-align: center;justify-content: center;display: flex;flex-flow: row;margin: 3px 0px;transform: translate3d(-5px, 0px, 0px);-webkit-transform: translate3d(-5px, 0px, 0px);-moz-transform: translate3d(-5px, 0px, 0px);-o-transform: translate3d(-5px, 0px, 0px);box-sizing: border-box;"><div style="display: inline-block;width: 100%;vertical-align: top;align-self: flex-start;flex: 0 0 auto;background-color: rgb(255, 255, 255);padding: 0px 10px 0px 12px;margin: 0px;box-sizing: border-box;"><div style="margin: 1px 0px;box-sizing: border-box;"><div style="color: rgb(196, 52, 101);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">3</span></strong></p></div></div></div></div></div></div></div></div><div style="display: inline-block;vertical-align: middle;width: auto;min-width: 5%;max-width: 100%;flex: 0 0 auto;height: auto;align-self: center;padding: 0px 12px 0px 13px;margin: 0px;box-sizing: border-box;"><div style="margin: 0px;box-sizing: border-box;"><div style="color: rgb(196, 52, 101);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">Cognitive Kernel-Pro: A Framework </span></strong></p><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">for </span></strong><strong style="box-sizing: border-box;"><span leaf="">Deep Research Agents and </span></strong></p><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">Agent Foundation Models Training</span></strong></p></div></div></div></div></div></div><div style="font-size: 15px;letter-spacing: 1px;padding: 0px 2px;box-sizing: border-box;"><p style="letter-spacing: 1px;font-size: 15px;color: rgb(0, 0, 0);white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: justify;"><span leaf="">本文提出了 Cognitive Kernel-Pro，一个完全开源且在最大程度上免费的多模块智能代理框架，旨在推动先进人工智能代理的开发与评估的民主化。实验结果表明，Cognitive Kernel-Pro 在开源且免费的代理系统中达到当前最优水平，并超越此前领先的系统如 WebDancer 和 WebSailor，为可获取、高性能的人工智能代理树立了新的性能标杆。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><span style="color: rgb(163, 155, 155);box-sizing: border-box;"><strong style="box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"><span leaf="">论文链接：</span></span></strong><em style="box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"><span leaf=""><a href="https://go.hyper.ai/HIS8M" target="_blank">https://go.hyper.ai/HIS8M</a></span></span></em></span></p></div><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><span style="color: rgb(163, 155, 155);box-sizing: border-box;"><strong style="box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"><span leaf="">CognitiveKernel-Pro-Query 文本生成基准数据集</span></span></strong></span><em style="color: rgb(163, 155, 155);font-size: 12px;box-sizing: border-box;"><span leaf="">：<a href="https://go.hyper.ai/ofF3N" target="_blank">https://go.hyper.ai/ofF3N</a></span></em></p><div style="text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;box-sizing: border-box;"><p style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;text-align: center;" nodeleaf=""><img class="rich_pages wxw-img" data-backh="330" data-backw="578" data-imgfileid="100039425" data-ratio="0.5710186513629842" data-s="300,640" style="vertical-align:middle;max-width:100%;width:100%;box-sizing:border-box;" data-type="png" data-w="1394" src="https://wechat2rss.xlab.app/img-proxy/?k=30890186&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQkCvnz083AiaXlORnyembgn8MMiaibhlIbNCCppXf5ZMuVWtbEzcJvvP976xpZNunNmXWzWCSqXn96k9Zcg5XSeaw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></p></div><div style="text-align: center;font-size: 12px;color: rgb(163, 155, 155);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">模型框架图</span></strong></p></div><div style="text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;box-sizing: border-box;"><p style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;text-align: center;" nodeleaf=""><img class="rich_pages wxw-img" data-backh="163" data-backw="578" data-imgfileid="100039422" data-ratio="0.2814814814814815" data-s="300,640" style="vertical-align:middle;max-width:100%;width:100%;box-sizing:border-box;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=4b7d90a3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQkCvnz083AiaXlORnyembgn8MMiaibhlIbNW1TjBkbNtKEzQxnzI3f3Tb3VEq73IsTE0k3G6la6e5rXtJUkXkOHqg%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></p></div><div style="text-align: center;font-size: 12px;color: rgb(163, 155, 155);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">论文思维导图</span></strong></p></div><div style="text-align: left;justify-content: flex-start;display: flex;flex-flow: row;margin: 10px 0px;box-sizing: border-box;"><div style="display: inline-block;width: 100%;vertical-align: top;align-self: flex-start;flex: 0 0 auto;background-color: rgb(255, 229, 241);box-sizing: border-box;"><div style="justify-content: flex-start;display: flex;flex-flow: row;margin: 0px;box-sizing: border-box;"><div style="display: inline-block;vertical-align: middle;width: 38px;align-self: center;flex: 0 0 auto;background-color: rgb(255, 96, 150);height: auto;padding: 0px;transform-style: preserve-3d;perspective: 50px;box-sizing: border-box;"><div style="transform: rotateY(23deg) translateZ(5px);-webkit-transform: rotateY(23deg) translateZ(5px);-moz-transform: rotateY(23deg) translateZ(5px);-o-transform: rotateY(23deg) translateZ(5px);box-sizing: border-box;"><div style="display: flex;width: 100%;flex-flow: column;box-sizing: border-box;"><div style="margin-top: 0px;margin-bottom: 0px;z-index: auto;box-sizing: border-box;"><div style="text-align: center;justify-content: center;display: flex;flex-flow: row;margin: 3px 0px;transform: translate3d(-5px, 0px, 0px);-webkit-transform: translate3d(-5px, 0px, 0px);-moz-transform: translate3d(-5px, 0px, 0px);-o-transform: translate3d(-5px, 0px, 0px);box-sizing: border-box;"><div style="display: inline-block;width: 100%;vertical-align: top;align-self: flex-start;flex: 0 0 auto;background-color: rgb(255, 255, 255);padding: 0px 10px 0px 12px;margin: 0px;box-sizing: border-box;"><div style="margin: 1px 0px;box-sizing: border-box;"><div style="color: rgb(196, 52, 101);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">4</span></strong></p></div></div></div></div></div></div></div></div><div style="display: inline-block;vertical-align: middle;width: auto;min-width: 5%;max-width: 100%;flex: 0 0 auto;height: auto;align-self: center;padding: 0px 12px 0px 13px;margin: 0px;box-sizing: border-box;"><div style="margin: 0px;box-sizing: border-box;"><div style="color: rgb(196, 52, 101);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">Simulating Human-Like </span></strong></p><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">Learning </span></strong><strong style="box-sizing: border-box;"><span leaf="">Dynamics with </span></strong></p><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">LLM-Empowered Agents</span></strong></p></div></div></div></div></div></div><div style="letter-spacing: 1px;padding: 0px 2px;box-sizing: border-box;"><p style="letter-spacing: 1px;font-size: 15px;color: rgb(0, 0, 0);white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: justify;"><span leaf="">本文提出了 LearnerAgent，一个基于大语言模型的新型多 Agent 框架，旨在模拟逼真的教学环境。为探索类人学习动态，研究团队构建了具有心理学依据的学习者画像，并设立无画像的通用学习者以检验基础 LLM 的默认行为。通过模拟「每周知识获取」「每月策略选择」「阶段性测试」与「同伴互动」，研究团队能够跟踪学习者为期一年的动态学习历程。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><span style="color: rgb(163, 155, 155);font-size: 12px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span style="color: rgb(163, 155, 155);box-sizing: border-box;"><span leaf="">论文链接</span></span></strong><strong style="box-sizing: border-box;"><span style="color: rgb(163, 155, 155);box-sizing: border-box;"><span leaf="">：</span></span></strong><em style="box-sizing: border-box;"><span style="color: rgb(163, 155, 155);box-sizing: border-box;"><span leaf=""><a href="https://go.hyper.ai/GbGs2" target="_blank">https://go.hyper.ai/GbGs2</a></span></span></em></span></p></div><div style="text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;box-sizing: border-box;"><p style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;text-align: center;" nodeleaf=""><img class="rich_pages wxw-img" data-backh="214" data-backw="578" data-imgfileid="100039424" data-ratio="0.37017994858611825" data-s="300,640" style="vertical-align:middle;max-width:100%;width:100%;box-sizing:border-box;" data-type="png" data-w="1556" src="https://wechat2rss.xlab.app/img-proxy/?k=4f30c58b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQkCvnz083AiaXlORnyembgn8MMiaibhlIbNtuibl2zicYaTM6PA9hCN4EkNzT5f29JzKJmkiafuw59ZncknwGjzjFaRg%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></p></div><div style="text-align: center;font-size: 12px;color: rgb(163, 155, 155);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">模型框架图</span></strong></p></div><div style="text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;box-sizing: border-box;"><p style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;text-align: center;" nodeleaf=""><img data-imgfileid="100039427" class="rich_pages wxw-img" data-ratio="0.4064814814814815" data-s="300,640" data-type="png" data-w="1080" style="vertical-align:middle;max-width:100%;width:100%;box-sizing:border-box;" data-backw="578" data-backh="235" src="https://wechat2rss.xlab.app/img-proxy/?k=945df9d8&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQkCvnz083AiaXlORnyembgn8MMiaibhlIbNkONaiavZ9FcnU7ToZeQibKawMuibOunOQQpBhuGfrXE2tRHlaurMObYdg%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></p></div><div style="text-align: center;font-size: 12px;color: rgb(163, 155, 155);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">论文思维导图</span></strong></p></div><div style="text-align: left;justify-content: flex-start;display: flex;flex-flow: row;margin: 10px 0px;box-sizing: border-box;"><div style="display: inline-block;width: 100%;vertical-align: top;align-self: flex-start;flex: 0 0 auto;background-color: rgb(255, 229, 241);box-sizing: border-box;"><div style="justify-content: flex-start;display: flex;flex-flow: row;margin: 0px;box-sizing: border-box;"><div style="display: inline-block;vertical-align: middle;width: 38px;align-self: center;flex: 0 0 auto;background-color: rgb(255, 96, 150);height: auto;padding: 0px;transform-style: preserve-3d;perspective: 50px;box-sizing: border-box;"><div style="transform: rotateY(23deg) translateZ(5px);-webkit-transform: rotateY(23deg) translateZ(5px);-moz-transform: rotateY(23deg) translateZ(5px);-o-transform: rotateY(23deg) translateZ(5px);box-sizing: border-box;"><div style="display: flex;width: 100%;flex-flow: column;box-sizing: border-box;"><div style="margin-top: 0px;margin-bottom: 0px;z-index: auto;box-sizing: border-box;"><div style="text-align: center;justify-content: center;display: flex;flex-flow: row;margin: 3px 0px;transform: translate3d(-5px, 0px, 0px);-webkit-transform: translate3d(-5px, 0px, 0px);-moz-transform: translate3d(-5px, 0px, 0px);-o-transform: translate3d(-5px, 0px, 0px);box-sizing: border-box;"><div style="display: inline-block;width: 100%;vertical-align: top;align-self: flex-start;flex: 0 0 auto;background-color: rgb(255, 255, 255);padding: 0px 10px 0px 12px;margin: 0px;box-sizing: border-box;"><div style="margin: 1px 0px;box-sizing: border-box;"><div style="color: rgb(196, 52, 101);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><b style="box-sizing: border-box;"><span leaf="">5</span></b></p></div></div></div></div></div></div></div></div><div style="display: inline-block;vertical-align: middle;width: auto;min-width: 5%;max-width: 100%;flex: 0 0 auto;height: auto;align-self: center;padding: 0px 12px 0px 13px;margin: 0px;box-sizing: border-box;"><div style="margin: 0px;box-sizing: border-box;"><div style="color: rgb(196, 52, 101);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">villa-X: Enhancing Latent </span></strong></p><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">Action </span></strong><strong style="box-sizing: border-box;"><span leaf="">Modeling in Vision</span></strong></p><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">-Language-Action Models</span></strong></p></div></div></div></div></div></div><div style="font-size: 15px;letter-spacing: 1px;padding: 0px 2px;box-sizing: border-box;"><p style="letter-spacing: 1px;font-size: 15px;color: rgb(0, 0, 0);white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: justify;"><span leaf="">本文提出了 villa-X，一种新型视觉-语言-潜在动作框架，旨在提升潜在动作建模能力，从而学习可泛化的机器人操作策略。实验结果表明，villa-X 在 SIMPLER 与 LIBERO 等模拟环境中，以及在两种真实机器人平台上均取得了优异性能。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><span style="color: rgb(163, 155, 155);box-sizing: border-box;"><strong style="box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"><span leaf="">论文链接</span></span></strong><strong style="box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"><span leaf="">：</span></span></strong><em style="box-sizing: border-box;"><span style="font-size: 12px;box-sizing: border-box;"><span leaf=""><a href="https://go.hyper.ai/8IWxU" target="_blank">https://go.hyper.ai/8IWxU</a></span></span></em></span></p></div><div style="text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;box-sizing: border-box;"><p style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;text-align: center;" nodeleaf=""><img class="rich_pages wxw-img" data-backh="192" data-backw="578" data-imgfileid="100039423" data-ratio="0.3324324324324324" data-s="300,640" style="vertical-align:middle;max-width:100%;width:100%;box-sizing:border-box;" data-type="png" data-w="1480" src="https://wechat2rss.xlab.app/img-proxy/?k=98768571&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQkCvnz083AiaXlORnyembgn8MMiaibhlIbNeS3fvIcv0UmPt1xoHiauhPKfOfrqAxSXRpgiay0v3CQOKN8w09kB26zw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></p></div><div style="text-align: center;font-size: 12px;color: rgb(163, 155, 155);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">模型架构图</span></strong></p></div><div style="text-align: center;margin-top: 10px;margin-bottom: 10px;line-height: 0;box-sizing: border-box;"><p style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;box-sizing: border-box;text-align: center;" nodeleaf=""><img class="rich_pages wxw-img" data-backh="159" data-backw="578" data-imgfileid="100039428" data-ratio="0.275" data-s="300,640" style="vertical-align:middle;max-width:100%;width:100%;box-sizing:border-box;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=d5e477c3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FQkCvnz083AiaXlORnyembgn8MMiaibhlIbNXM8h095EFciaBCvhicwHllXr4mpK9nSOW4C0zRZXBUrjKlOc1sNsB4Gg%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></p></div><div style="text-align: center;font-size: 12px;color: rgb(163, 155, 155);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;"><strong style="box-sizing: border-box;"><span leaf="">论文思维导图</span></strong></p><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p></div></div><p style="display: none;"><mp-style-type data-value="10000"></mp-style-type></p>



<p><a href="http://hyper.ai">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=3e6c074b&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526320%26idx%3D3%26sn%3D99090df74e6047db3f4406b603b68b6d">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Sat, 16 Aug 2025 15:40:00 +0800</pubDate>
    </item>
    <item>
      <title>江佳凤（生于1996年），已任浙大博导</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526302&amp;idx=1&amp;sn=07c842b8101cd384cce692208df1f0a1</link>
      <description>近日，“浙江大学哲学学院”微信公众号刊文介绍该院2025年新进教师风采。其中，出生于1996年的江佳凤，受到关注。</description>
      <content:encoded><![CDATA[<p>
<span></span> <span>2025-08-15 14:31</span> <span style="display: inline-block;">浙江</span>
</p>




<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=61b61fb9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2F87HjJEl4c1ttYPxjPIaZDASAIuIabFIAUdvx9jmwQqa1TQzGvHANDhAoib8bAgLy7PXJ5nrxeicO5L5T8oAVx93Q%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p style="box-sizing: inherit;margin: 34px 0px;padding: 0px;text-align: justify;color: rgb(64, 64, 64);font-family: Arial, &#34;Hiragino Sans GB&#34;, STHeiti, &#34;Helvetica Neue&#34;, Helvetica, &#34;Microsoft Yahei&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 18px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;" data-pm-slice="0 0 []"><span leaf="">近日，“浙江大学哲学学院”微信公众号刊文介绍该院2025年新进教师风采。其中，出生于1996年的</span><span search-type="3" search-href="newsapp://nc/search?entry=articleKeyword&amp;word=%E6%B1%9F%E4%BD%B3%E5%87%A4" style="box-sizing: inherit;"><span leaf="">江佳凤</span></span><span leaf="">，受到关注。</span></p><p style="box-sizing: inherit;margin: 34px 0px;padding: 0px;text-align: center;line-height: 20px;font-size: 16px;color: rgb(102, 102, 102);font-family: Arial, &#34;Hiragino Sans GB&#34;, STHeiti, &#34;Helvetica Neue&#34;, Helvetica, &#34;Microsoft Yahei&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;" nodeleaf=""><img data-imgfileid="100042644" class="rich_pages wxw-img" data-ratio="1" data-type="jpeg" data-w="632" style="box-sizing: inherit;border: 0px;max-width: 100%;margin-bottom: 10px;" src="https://wechat2rss.xlab.app/img-proxy/?k=c87a1dbd&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2F87HjJEl4c1ttYPxjPIaZDASAIuIabFIALhnyWyKcwiaKx4PG6WJ6ibes4eAqH4yxX6WEbb6ANVCK8ic4libGtfcWZQ%2F640%3Fwx_fmt%3Djpeg%26from%3Dappmsg"/></p><p style="box-sizing: inherit;margin: 34px 0px;padding: 0px;text-align: justify;color: rgb(64, 64, 64);font-family: Arial, &#34;Hiragino Sans GB&#34;, STHeiti, &#34;Helvetica Neue&#34;, Helvetica, &#34;Microsoft Yahei&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 18px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"><span leaf="">据介绍，江佳凤系博士生导师，专业方向为中国哲学。中国社会科学院哲学研究所主办《哲学研究》期刊显示，江佳凤为1996年出生。</span></p><p style="box-sizing: inherit;margin: 34px 0px;padding: 0px;text-align: center;line-height: 20px;font-size: 16px;color: rgb(102, 102, 102);font-family: Arial, &#34;Hiragino Sans GB&#34;, STHeiti, &#34;Helvetica Neue&#34;, Helvetica, &#34;Microsoft Yahei&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;" nodeleaf=""><img data-imgfileid="100042646" class="rich_pages wxw-img" data-ratio="0.3712121212121212" data-type="jpeg" data-w="660" style="box-sizing: inherit;border: 0px;max-width: 100%;margin-bottom: 10px;" src="https://wechat2rss.xlab.app/img-proxy/?k=56ef057b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2F87HjJEl4c1ttYPxjPIaZDASAIuIabFIACUvjVIYHibftTz0khTZW71dkcDggicGYraG0IkibWc37geibIvAakMLaHA%2F640%3Fwx_fmt%3Djpeg%26from%3Dappmsg"/></p><p style="box-sizing: inherit;margin: 34px 0px;padding: 0px;text-align: justify;color: rgb(64, 64, 64);font-family: Arial, &#34;Hiragino Sans GB&#34;, STHeiti, &#34;Helvetica Neue&#34;, Helvetica, &#34;Microsoft Yahei&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 18px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"><span leaf="">▲ 图源：“ 哲学研究”微信公号</span></p><p style="box-sizing: inherit;margin: 34px 0px;padding: 0px;text-align: justify;color: rgb(64, 64, 64);font-family: Arial, &#34;Hiragino Sans GB&#34;, STHeiti, &#34;Helvetica Neue&#34;, Helvetica, &#34;Microsoft Yahei&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 18px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"><span leaf="">公开资料显示，江佳凤是南昌大学文学学士，厦门大学哲学硕士，北京师范大学哲学博士，国家公派新加坡国立大学联合培养博士。</span></p><p style="box-sizing: inherit;margin: 34px 0px;padding: 0px;text-align: justify;color: rgb(64, 64, 64);font-family: Arial, &#34;Hiragino Sans GB&#34;, STHeiti, &#34;Helvetica Neue&#34;, Helvetica, &#34;Microsoft Yahei&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 18px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"><span leaf="">研究领域为朱子学、宋明理学。博士论文以《孟子》“尽心”章为研究对象，系统梳理并评析了中国儒学史上具有代表性且特色鲜明的相关诠释，在此基础上深入剖析了从先秦至清初该章诠释的流变过程与时代特征，揭示了“尽心”章在中国哲学天人关系论域中的重要地位。博士期间的研究同时涉及韩国儒学（如四七理气之辨）及元明清四书学发展（如《增广性理字训》）等领域。</span></p><p style="box-sizing: inherit;margin: 34px 0px;padding: 0px;text-align: center;line-height: 20px;font-size: 16px;color: rgb(102, 102, 102);font-family: Arial, &#34;Hiragino Sans GB&#34;, STHeiti, &#34;Helvetica Neue&#34;, Helvetica, &#34;Microsoft Yahei&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;" nodeleaf=""><img data-imgfileid="100042645" class="rich_pages wxw-img" data-ratio="1" data-type="jpeg" data-w="660" style="box-sizing: inherit;border: 0px;max-width: 100%;margin-bottom: 10px;" src="https://wechat2rss.xlab.app/img-proxy/?k=7db38284&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2F87HjJEl4c1ttYPxjPIaZDASAIuIabFIAvlseBAfqKItrVdZX36gcRrjdYq2LAGZR3VtBYnJvicJUvicCA2ELuHpg%2F640%3Fwx_fmt%3Djpeg%26from%3Dappmsg"/></p><p style="box-sizing: inherit;margin: 34px 0px;padding: 0px;text-align: justify;color: rgb(64, 64, 64);font-family: Arial, &#34;Hiragino Sans GB&#34;, STHeiti, &#34;Helvetica Neue&#34;, Helvetica, &#34;Microsoft Yahei&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 18px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"><span leaf="">江佳凤曾在《哲学研究》《哲学与文化》等国内外高水平学术期刊发表论文6篇；参与国家社科基金项目2项；担任《国际儒藏·韩国编》审校专业委员会审校专家；先后获国家奖学金、北京师范大学“研究生学术创新奖”特等奖、二等奖，北京师范大学哲学学院优秀博士学位论文等荣誉。</span></p><p style="box-sizing: inherit;margin: 34px 0px;padding: 0px;text-align: justify;color: rgb(64, 64, 64);font-family: Arial, &#34;Hiragino Sans GB&#34;, STHeiti, &#34;Helvetica Neue&#34;, Helvetica, &#34;Microsoft Yahei&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 18px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"><span leaf="">值得一提的是，近年来，一批优秀的“90后”教授、博士生导师陆续涌现，为高校注入了新的教学和科研力量。这些“90后”博导不仅科研实力强、年轻充满活力，也比较容易和学生打成一片，团队气氛往往轻松活跃，更受到学生青睐。不过，他们也面临着成长的压力。有媒体评论指出，对年轻学者应更多聚焦其主业，营造相对宽松的氛围，以及温馨、和谐、支持性的工作环境，从而激发他们的工作热情和创造力，使其在工作中实现自我价值、谋求职业发展。</span></p><p style="box-sizing: inherit;margin: 34px 0px;padding: 0px;text-align: justify;color: rgb(64, 64, 64);font-family: Arial, &#34;Hiragino Sans GB&#34;, STHeiti, &#34;Helvetica Neue&#34;, Helvetica, &#34;Microsoft Yahei&#34;, &#34;WenQuanYi Micro Hei&#34;, sans-serif;font-size: 18px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;"><strong style="box-sizing: inherit;font-style: normal;"><span leaf="">来源 人民日报综合浙江新闻、</span></strong><strong style="box-sizing: inherit;font-style: normal;"><span leaf="">浙江大学哲学学院、哲学研究、光明日报、中国青年报、广州日报等</span></strong></p><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247526302">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=8800d108&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526302%26idx%3D1%26sn%3D07c842b8101cd384cce692208df1f0a1">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Fri, 15 Aug 2025 14:31:00 +0800</pubDate>
    </item>
    <item>
      <title>Claude Code真的很神？</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526302&amp;idx=2&amp;sn=e314ab930383761414e4a76ef53b8a1a</link>
      <description>很多人习惯了VsCode、Trae这样的图形化AI编程界面，而Anthropic发布的Claude Code</description>
      <content:encoded><![CDATA[<p>
<span>Python大数据分析</span> <span>2025-08-15 14:31</span> <span style="display: inline-block;">浙江</span>
</p>




<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=3b0b3373&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2Fg64sbb6Ffmc1h5sN4AheHMoMTxFLzQE2b87WpspibFiaYAG4DCq76Pt3hIXmxldOUAgLk4kvqw0TWh08tgRxVbzg%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<div data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 10px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: linear-gradient(90deg, rgba(50, 0, 0, 0.05) 3%, rgba(0, 0, 0, 0) 3%), linear-gradient(360deg, rgba(50, 0, 0, 0.05) 3%, rgba(0, 0, 0, 0) 3%);background-origin: padding-box;background-repeat: no-repeat;background-size: 20px 20px;width: auto;font-family: Optima-Regular, ptima-Regular, ptima-Regular, ptima-Regular, ptima-Regular;font-size: 16px;color: rgb(89, 89, 89);line-height: 1.75;word-spacing: 0em;letter-spacing: 2px;word-break: break-word;overflow-wrap: break-word;text-align: left;background-position-x: center;background-position-y: center;" data-pm-slice="0 0 []"><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">很多人习惯了VsCode、Trae这样的图形化AI编程界面，而Anthropic发布的Claude Code是在命令行上写代码，看似简陋，却强大的很。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="511601388" data-ratio="0.7037037037037037" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-left-radius: 6px;border-top-right-radius: 6px;border-bottom-right-radius: 6px;border-bottom-left-radius: 6px;object-fit: contain;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=cbda6411&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmc1h5sN4AheHMoMTxFLzQE2aVMx2AuTUChU3K8nbOxhGKxeLhDKQlYgyW5yqeZmKTqFX3Gyic9UcRQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/>扔掉复杂的软件外壳，只有极简的命令行，直接在终端让AI接管编程，变成终端原生应用。<img class="rich_pages wxw-img" data-imgfileid="511601390" data-ratio="0.687962962962963" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-left-radius: 6px;border-top-right-radius: 6px;border-bottom-right-radius: 6px;border-bottom-left-radius: 6px;object-fit: contain;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=7d70759e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmc1h5sN4AheHMoMTxFLzQE2J44UxCcIXsOrdX1s1cEStvgqp42cbKI0WaEFvn5XKLht1NFiaicUWQCw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">这样做的“坏处”是回归到Linux这样的纯代码开发，拦住了不少小白用户，但好处更多，成为真正的自动化编程。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">1、代理式编程，从0到100都交给AI。AI作为架构师，接管全局代码，而不是原来简单的补全、生成，压根不需要你插手。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">2、访问权限更大。通过命令行工具更直接的控制电脑，包括环境部署、API通信、数据库、监控和版本控制。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">3、在本地终端运行，更加安全，任何指令都需要用户批准。</span></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="511601391" data-ratio="0.7694444444444445" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=b2be3fe5&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmc1h5sN4AheHMoMTxFLzQE2tqkQia9zLpDKZhqvY5jKfSXcgapZmhmZ6ZicYW2AKEHiaVpDFj8c50iayA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">如果还是想在图形界面写代码，Claude Code也能与Pycharm、Vscode等IDE集成，直接写到代码文件中，简单高效。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">安装Claude Code也很简单，以Mac为例，首先你需要安装Node.js 18+ 版本。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">在终端输入：</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/wXJ5kSJT6OOQicxWXPS9zJauRDa4IUp9474xf2TJknSzpz96BUyfiajCbib8WqJLJpPfw6wXYG0RMa4PnQ6UdrfhJ2kOUxloYVW/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 下载安装nvm:</span></span><span leaf="">curl -o- <a href="https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh" target="_blank">https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh</a> | bash</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 下载安装Node.js:</span></span><span leaf="">nvm install 22</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 确认Node.js版本:</span></span><span leaf="">node -v </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># Should print &#34;v22.18.0&#34;.</span></span><span leaf="">nvm current </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># Should print &#34;v22.18.0&#34;.</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 确认npm版本:</span></span><span leaf="">npm -v </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># Should print &#34;10.9.3&#34;.</span></span></code></pre><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">接着安装claude code，在终端输入：</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/wXJ5kSJT6OOQicxWXPS9zJauRDa4IUp9474xf2TJknSzpz96BUyfiajCbib8WqJLJpPfw6wXYG0RMa4PnQ6UdrfhJ2kOUxloYVW/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">npm install -g @anthropic-ai/claude-code</span></code></pre><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">配置好后，在终端启动Claude Code，输入</span><code style="font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: rgba(27, 31, 35, 0.05);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;margin-top: 0px;margin-bottom: 0px;margin-left: 2px;margin-right: 2px;padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;overflow-wrap: break-word;font-family: Consolas, Monaco, Menlo, monospace;word-break: break-all;color: rgb(89, 89, 89);"><span leaf="">Claude</span></code><span leaf="">即可。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">你还可以配置其他模型，比如GLM-4.5</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">先打开终端，然后输入以下命令。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/wXJ5kSJT6OOQicxWXPS9zJauRDa4IUp9474xf2TJknSzpz96BUyfiajCbib8WqJLJpPfw6wXYG0RMa4PnQ6UdrfhJ2kOUxloYVW/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #e6c07b;line-height: 26px;"><span leaf="">export</span></span><span leaf=""> ANTHROPIC_BASE_URL=<a href="https://open.bigmodel.cn/api/anthropic " target="_blank">https://open.bigmodel.cn/api/anthropic </a></span><span style="color: #e6c07b;line-height: 26px;"><span leaf="">export</span></span><span leaf=""> ANTHROPIC_AUTH_TOKEN=</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;这里输入你注册的bigmodel API keys&#34;</span></span></code></pre><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">当你看到终端出现以下的界面，说明Claude Code已经安装好，就能开始愉快的编程了。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="511601387" data-ratio="0.6129629629629629" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-left-radius: 6px;border-top-right-radius: 6px;border-bottom-right-radius: 6px;border-bottom-left-radius: 6px;object-fit: contain;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=2666a10b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmc1h5sN4AheHMoMTxFLzQE28WD2pEPThicZMsSXFwgWDTlWNx02hY0aMFawStUwN2ZbLt4XcFTRsww%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/>写一个复杂的任务，直接生成一个网站，比如搭建一个类似知乎的网站。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="511601389" data-ratio="0.687962962962963" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-left-radius: 6px;border-top-right-radius: 6px;border-bottom-right-radius: 6px;border-bottom-left-radius: 6px;object-fit: contain;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=c848a0bc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmc1h5sN4AheHMoMTxFLzQE2BLhU7qF1gdSzicVgmntmf6iccjqQ5Ym7GUKPIiaQa3hiauZEojlZV2Y7UQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/>最终会你会看到如下的效果，它生成了一个完整的网页，UI和知乎几乎一致，可以注册、登陆、提问、关注，还有推荐、热榜、话题等功能，不能说一模一样，可以说形神兼备。</span></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="511601395" data-ratio="0.5324074074074074" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=c913bb8b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmc1h5sN4AheHMoMTxFLzQE2wBSSo44Vu9D4FibDPK5xbiacTKgGVSepHnzGJrf0fABBQoxssjSsSm1w%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">初步测试下来，Claude Code真的很强。</span></p><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p></div><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247526302">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=cd781d19&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526302%26idx%3D2%26sn%3De314ab930383761414e4a76ef53b8a1a">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Fri, 15 Aug 2025 14:31:00 +0800</pubDate>
    </item>
    <item>
      <title>中央军委主席习近平签署通令：大学教授被记三等功！</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526302&amp;idx=3&amp;sn=e295b2be873f9fa72a8c7119f3a63f44</link>
      <description></description>
      <content:encoded><![CDATA[<p>
<span></span> <span>2025-08-15 14:31</span> <span style="display: inline-block;">浙江</span>
</p>




<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=a78be085&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2F87HjJEl4c1ttYPxjPIaZDASAIuIabFIAHibtBM1D47Bz467KsKxwwxJeCtrNiciaxBjiamaBdQw8hR3p6UmuuCUbhA%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<div powered-by="xiumi.us" style="margin-bottom: 0px;visibility: visible;"><div style="visibility: visible;margin-bottom: 0px;"><p style="text-align: right;visibility: visible;margin-bottom: 0px;"><strong style="visibility: visible;margin-bottom: 0px;"><span style="font-size: 14px;color: rgb(136, 136, 136);visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">63来源：新华社、湖北日报</span><span leaf="" style="visibility: visible;margin-bottom: 0px;">（王际凯、熊峰、侯融）</span></span></strong></p><p bfdi="74" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">江城7月，暑意正浓，刚从北京出差回来顾不上休整，海军工程大学杨自春教授步履匆匆地走进实验室，围绕未来海战，饱含深情地向新来校报到的研究生学员介绍学科专业，畅谈理想追求。</span></p><p bfdi="75" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">“瞄准未来战场，学好前沿知识，将为你们的强军梦打下扎实基础；而矢志培育人才、加快科研攻关，就是我们军队教育工作者的使命职责。”杨自春说。</span></p><p bfdi="76" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">7月31日，新华社发布消息，中央军委主席习近平日前签署通令，给2个单位、5名个人记功。海军工程大学教授杨自春被记国防科技三等功。</span></p><p bfdi="76" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;visibility: visible;" nodeleaf=""><img class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-imgfileid="100153659" data-ratio="0.5333333333333333" data-s="300,640" type="block" data-type="png" data-w="1080" style="visibility: visible;margin-bottom: 0px;width: 677px !important;height: auto;" src="https://wechat2rss.xlab.app/img-proxy/?k=7229a26b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FWxmevetWSahsEFObN48dCe9ODe2zMrnjIPR21TXOlM0xZah5I7jY43JD2OPtlMfCN9xdzWa6YJQvZPmaeumDXQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><div class="js_blockquote_wrap" style="padding-left: 10px;border-left: 3px solid rgb(219, 219, 219);color: rgba(0, 0, 0, 0.55);font-size: 15px;padding-top: 4px;margin: 1em 0px;text-indent: 0px;visibility: visible;"><div class="js_blockquote_digest" style="visibility: visible;margin-bottom: 0px;"><p style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">新华社北京7月31日电　中央军委主席习近平日前签署通令，给2个单位、5名个人记功。 </span></p><p style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">给中国人民解放军63920部队二室记一等功，给中国人民解放军92853部队丁阳记国防科技一等功。 </span></p><p style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">给中国人民解放军96712部队记二等功。</span></p><p style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">给原陆军装甲兵学院王海斗、陆军军医大学高钰琪、海军工程大学杨自春、军事科学院军事医学研究院陈薇分别记国防科技三等功。</span></p></div><p class="blockquote_info js_blockquote_source" data-json="%7B%22type%22%3A%22out%22%2C%22article%22%3A%7B%7D%2C%22from%22%3A%22%E6%96%B0%E5%8D%8E%E7%A4%BE%22%7D" style="visibility: visible;margin-bottom: 0px;"><span class="blockquote_other" style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">新华社</span></span></p></div><p bfdi="77" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;visibility: visible;"><strong bfdi="78" style="visibility: visible;margin-bottom: 0px;"><span style="font-weight: bold;box-sizing: border-box;visibility: visible;margin-bottom: 0px;"><span style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 24px;color: rgb(64, 118, 0);">把铺盖卷搬到了实验室</span></span></span></span></strong></p><p bfdi="79" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">一块砖头，价值几何？</span></p><p bfdi="80" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">新型绝热材料研究，是杨自春在科研战场上的主攻方向。在他看来，舰船锅炉用的耐火砖，有的比金子还贵。</span></p><p bfdi="81" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">耐火砖作为一种镶嵌在舰船锅炉内壁的耐火隔热材料，要经受熊熊大火的炙烤，一旦受损坍塌，战舰就会立刻丧失动力无法航行，且在短时间内难以修复。多年前，我国多数舰艇的耐火砖依赖进口，装备保障受制于人。</span></p><p bfdi="82" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;visibility: visible;"><span leaf="" style="margin-bottom: 0px;">事关重大，有关部门把自主研发新型耐火砖的任务下达给杨自春所在的教研室。杨自春像铆足了劲的发条，开始日夜奋战。</span></p><p bfdi="83" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;"><span leaf="" style="margin-bottom: 0px;">能降低炉内高温，还能抵抗内部气流、火炮射击、导弹发射等形成的强烈振动和冲击。这样的耐火砖，该选什么样的材料？杨自春查阅大量文献资料，遍访国内知名的耐火材料研究院所和厂家，最后将目光锁定在一种新型陶瓷材料上。</span></p><p bfdi="84" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;"><span leaf="" style="margin-bottom: 0px;">随后，杨自春制定了九类陶瓷材料配方和100多个对比试验方案。材料从送进炉膛预热到烧制成品要一个星期，杨自春和战友们把铺盖卷搬到了实验室。前后历时一年多，新型陶瓷材料的配方最终得以确定。</span></p><p bfdi="85" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;"><span leaf="" style="margin-bottom: 0px;">从样品到实装，还需要进行大量的陆上试验。经过反复测试，陆上试验合格。杨自春又马不停蹄地赶往某驱逐舰支队，进行海上性能考核试验。</span></p><p bfdi="86" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;"><span leaf="" style="margin-bottom: 0px;">成功了！那天，在全工况、高负荷测试中，耐火砖“争气”地表现出了优异的物理性能。</span></p><p bfdi="87" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;"><span leaf="" style="margin-bottom: 0px;">前后历经7年，杨自春研制出了超高温高抗热震陶瓷材料，这种材料的高温耐压性能比进口材料提高了一倍，价格却只有国外产品的六分之一，更重要的是避免了重点武器装备受制于人。</span></p><p bfdi="88" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;"><strong bfdi="89" style="margin-bottom: 0px;"><span style="font-weight: bold;box-sizing: border-box;margin-bottom: 0px;"><span style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 24px;color: rgb(64, 118, 0);">30余载，他为国防育人</span></span></span></span></strong></p><p bfdi="90" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;"><span leaf="" style="margin-bottom: 0px;">有一件事，令杨自春的博士研究生张震至今难忘。</span></p><p bfdi="91" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;"><span leaf="" style="margin-bottom: 0px;">一次，张震将一项实验结果交给导师杨自春时，内心忐忑不安，虽然他已经过反复计算验证，可结果就是“与众不同”。到底是哪个环节出问题了，他怎么也找不到答案。</span></p><p bfdi="92" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;"><span leaf="" style="margin-bottom: 0px;">“出乎意料的结果，也可能是发现了一条全新路径。”令张震意想不到的是，杨自春没有否定实验结果，而是鼓励他在这个“不同”中深挖细研。在杨自春指导下，张震经过艰难攻关，最终合成出一种在国防领域极具应用前景的新型材料，相关学术研究成果被化学领域顶级期刊刊发。</span></p><p bfdi="93" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;"><span leaf="" style="margin-bottom: 0px;">像对待张震的实验结果一样，杨自春把每名学员探索未知领域的创意灵感都视作珍宝，鼓励他们大胆开拓创新、勇敢挑战权威，紧贴装备应用和备战打仗搞科研，收获了累累硕果。</span></p><p bfdi="94" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;"><span leaf="" style="margin-bottom: 0px;">“教育是一项神圣而庄严的事业，必须倾注全部心血去做。”在30余载的教学生涯中，杨自春始终坚守军队教育工作者的初心使命。无论面对的是博士、硕士，还是本科学员，他都突出为战育人，围绕备战打仗精心备课、细致打磨，力求让课堂生动有趣、深入浅出，用实际行动践行着对军队教育事业的无限热爱与执着追求。</span></p><p bfdi="95" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;"><span leaf="" style="margin-bottom: 0px;">2013年，杨自春整合教研室的材料研究力量，组建“舰船高温热防护材料创新团队”。经过10多年建设，实验室拥有国内先进的试验设备和检测手段，能独立进行舰船高温结构复合材料全部陆上试验，并与武汉理工大学、同济大学、洛阳耐火材料研究院、北京科技大学等国内相关专业院所建立了良好的合作关系，为海军重点装备新材料新技术、结构强度及寿命分析研究提供了可靠平台。</span></p><p bfdi="96" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;"><span leaf="" style="margin-bottom: 0px;">在积极搭建平台，栽好梧桐树的同时，杨自春把更多的精力放在了青年才俊的培养上。他时常告诫自己：“培养一个人才，远比某项科研成功更有意义，更有价值。”</span></p><p bfdi="97" style="box-sizing: border-box;margin: 0px;padding: 10px 0px;word-break: break-word;color: rgb(51, 51, 51);font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-indent: 0px;text-align: justify;font-family: 宋体 !important;"><span leaf="" style="margin-bottom: 0px;">2023年，杨自春带领的团队荣获海军首批高端科技创新团队的殊荣。团队成员中有多人次入选国家万人计划青年拔尖人才、军队“学科拔尖人才”“科技英才”等高层次人才计划，更有10人次荣立三等功。2024年，杨自春被评为“全国模范教师”。</span></p></div></div><div data-id="us2339328" style="margin: 0px;padding: 0px;white-space: normal;"><div style="margin: 0px;padding: 0px;"><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p></div></div><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247526302">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=b44e3a6f&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526302%26idx%3D3%26sn%3De295b2be873f9fa72a8c7119f3a63f44">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Fri, 15 Aug 2025 14:31:00 +0800</pubDate>
    </item>
    <item>
      <title>毕业论文不合格、迟到40分钟……判定二级教学事故！大学教师被解聘</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526291&amp;idx=1&amp;sn=0381daf4d883fefe91e6ea5cfcc673de</link>
      <description></description>
      <content:encoded><![CDATA[<p>
<span></span> <span>2025-08-14 17:38</span> <span style="display: inline-block;">浙江</span>
</p>




<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=9890f529&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2F87HjJEl4c1u7GAxMiaAibrox6eWnFguhhxygYcWstRcO3NtVBFMHwJoiaVqVibJkyq5UOicfuBJqX7w4hb4K5A4IggQ%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;clear: both;min-height: 1em;color: rgba(0, 0, 0, 0.9);font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: 0.544px;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-family: -apple-system-font, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1em;text-align: left;background-color: rgb(255, 255, 255);visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;color: rgb(136, 136, 136);font-size: 14px;visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span leaf="" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;visibility: visible;box-sizing: border-box !important;overflow-wrap: break-word !important;">来源：</span><span leaf="" style="visibility: visible;margin-bottom: 0px;">麦可思研究整理自各高校网站、麦可思研究等</span></span></p><p style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;clear: both;min-height: 1em;color: rgba(0, 0, 0, 0.9);font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: 0.544px;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-family: -apple-system-font, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1em;text-align: left;background-color: rgb(255, 255, 255);visibility: visible;"><span style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;color: rgb(136, 136, 136);font-size: 14px;visibility: visible;"><span leaf="" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible;">编辑：学妹</span></span><span leaf="" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible;"><img title="三角形分割线" alt="图片" class="rich_pages wxw-img __bg_gif" data-ratio="0.029513888888888888" data-type="gif" data-w="1152" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;vertical-align: bottom;font-family: inherit;text-align: center;color: rgb(62, 62, 62);display: inline;box-sizing: border-box !important;overflow-wrap: break-word !important;height: auto;visibility: visible !important;width: 677px !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=960cfeca&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz%2FyqVAqoZvDibHW4ynpBjRrolMxOZtKTiaYgGib3Z1r7qO6vXvLcXPmzYxbdQeJ8vcQcICOj6WbeuYRM3kdvBzehtkA%2F640%3Fwx_fmt%3Dgif%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwebp"/></span></p><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 16px;margin-right: 16px;visibility: visible;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">近日，福建某高校发布了三起教师教学事故及处理结果的通报。其中：</span></span></p><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 16px;margin-right: 16px;visibility: visible;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">一名教师因发生“</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(171, 25, 66);font-weight: bold;">试卷出现1处有提示标准答案</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">”教学事故，经审议认定给予</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(171, 25, 66);font-weight: bold;">三级教学事故</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">处理，按规定</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(0, 122, 170);font-weight: bold;">扣减其当月绩效工资的20%</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">，并予以</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(0, 122, 170);font-weight: bold;">全校通报</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">。对试卷审核把关不严的</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(0, 122, 170);font-weight: bold;">专业带头人</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">予以</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(0, 122, 170);font-weight: bold;">全校通报批评</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">。</span></span></p><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 16px;margin-right: 16px;visibility: visible;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">一名教师发生“</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(171, 25, 66);font-weight: bold;">教师未事先报备导致缺课</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">”教学事故，经审议认定给予</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(171, 25, 66);font-weight: bold;">三级教学事故处理</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">，按规定</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(0, 122, 170);font-weight: bold;">扣减当月绩效工资的20%</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">，并予以</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(0, 122, 170);font-weight: bold;">全校通报</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">。</span></span></p><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 16px;margin-right: 16px;visibility: visible;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">一外聘教师，发生“</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(171, 25, 66);font-weight: bold;">非客观因素造成缺课</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">”教学事故，经审议认定给予</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(171, 25, 66);font-weight: bold;">二级教学事故处理</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">，按规定</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(0, 122, 170);font-weight: bold;">扣减本门课程课酬的15%</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">，并予以全校通报，</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(171, 25, 66);font-weight: bold;">解除聘任合同</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">。</span></span></p><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 16px;margin-right: 16px;visibility: visible;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">教学事故的发生在高校中并不鲜见，但却能时刻让大学老师闻之色变。只因一旦被判定为教学事故，对教师的绩效、评优、职称评定、教学工作考核等都有极大的影响。</span></span></p><div data-mpa-template="t" mpa-data-temp-power-by="yiban.io" mpa-from-tpl="t" data-mpa-action-id="mearw0xtyva" style="margin-bottom: 24px;"><div style="width: 100%;display: flex;justify-content: center;align-items: center;margin-bottom: 0px;" data-mid="" mpa-from-tpl="t"><div style="display: flex;justify-content: flex-start;align-items: center;flex-direction: column;margin-bottom: 0px;" data-mid="" mpa-from-tpl="t"><div data-mid="" mpa-from-tpl="t" style="z-index: 1;background: url(https://mmbiz.qpic.cn/mmbiz_png/ZGEv25p8UdFZ1S3KsDOMrQ7GXrZPKoAOJjSGhoufRvRKFzsyA84aF8Mcz7HkjcwsrZek6I8Ziczv4em8v2wxjsQ/640?from=appmsg) 0% 0% / 19px 42px repeat rgb(223, 242, 249);width: 100%;text-align: center;padding: 8px 22px;margin-bottom: 0px;"><p yb-mpa-mark="mark-style-text" style="font-weight: bold;font-size: 18px;color: rgb(37, 117, 149);line-height: 25px;margin-bottom: 0px;" data-mid=""><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;">多所大学通报教学事故处理情况</span></span></p></div><div style="display: flex;justify-content: flex-start;align-items: center;flex-direction: column;align-self: flex-end;margin-bottom: 0px;" data-mid="" mpa-from-tpl="t"><p nodeleaf="" style="width: 80px;display: flex;justify-content: center;align-items: center;align-self: flex-end;margin-top: -25px;margin-right: -6px;margin-bottom: 0px;" data-mid="" mpa-from-tpl="t"><img style="display: block;background-color: transparent;margin-bottom: 0px;width: 80px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.3125" data-w="160" src="https://wechat2rss.xlab.app/img-proxy/?k=09947b80&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FIVRBzlsfVMDIocfia85P4fibDfx58oebbvK5gqI89KajXkEvHOvysxJhpgvoKAGWsMic63dLlQkjFNX4gFUicTsM1g%2F640%3Ffrom%3Dappmsg"/></p></div></div></div></div><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 16px;margin-right: 16px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">纵观不少高校对教学事故的处理公示。河南某高校对2023-2024学年第二学期教学事故进行通报，提到在2023年河南省本科毕业设计（论文）抽检工作中，一名教师指导的一篇</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(0, 122, 170);font-weight: bold;">成人高等教育论文经专家评定结果为不合格</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">，一名教师</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(171, 25, 66);font-weight: bold;">指导的一篇论文经专家评定结果为不合格</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">，分别被认定为</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(0, 122, 170);font-weight: bold;">三级和</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(171, 25, 66);font-weight: bold;">二级教学事故</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">。</span></span></p><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 16px;margin-right: 16px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">南京某大学通报，2023-2024学年第一学期处理监考迟到教学失误1起、试卷丢失教学失误1起。此外还处理了教师</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(0, 122, 170);font-weight: bold;">擅自离开教学岗位</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">2起，其中</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(0, 122, 170);font-weight: bold;">严重教学事故1起，一般教学事故1起</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">。</span></span></p><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 16px;margin-right: 16px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">天津某大学通报2023-2024-1学期本科教学事故，一教师上课</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(0, 122, 170);font-weight: bold;">迟到40分钟</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">，按照二级教学事故处理，给予全校通报批评。</span></span></p><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 16px;margin-right: 16px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">............</span></span></p><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 16px;margin-right: 16px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">此前我们曾提过，各高校教学事故根据情节和后果轻重，一般分为一般（Ⅲ级）、严重（Ⅱ级）、重大（Ⅰ级）三个等级，部分高校还会在这三个等级之前，设置更轻一级的教学过失/教学差错。也有高校将较轻微的情节称为教学差错/教学失误，较严重的称为一般教学事故和严重教学事故。</span></span></p><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 16px;margin-right: 16px;"><span leaf="" style="margin-bottom: 0px;"><img data-imgfileid="100293428" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="1.7675925925925926" data-s="300,640" data-type="webp" data-w="1080" style="box-shadow: rgb(210, 210, 210) 0px 0px 0.5em 0px;background-color: transparent;margin-bottom: 0px;width: 645px !important;height: auto;" type="block" src="https://wechat2rss.xlab.app/img-proxy/?k=d2dcd3b9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FR6iaFp0bicyN6gyLfLPOfqibUkIagvpKOzicUcPZ44qTo6Y1962Vd00cch80ibelCjHqMDmP54zVzYm0tvpZ4Ys0IRA%2F640%3Fwx_fmt%3Djpeg%26from%3Dappmsg"/></span></p><p style="margin-left: 16px;margin-right: 16px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">总的来说，各个高校在规定、命名等方式上各有不同，但划分的等级差别并不大。其中，重大（Ⅰ级）教学事故已经属于十分严重的处罚。</span></span></p><p style="margin-left: 16px;margin-right: 16px;line-height: 1.75em;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><img data-imgfileid="100293429" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.8444444444444444" data-s="300,640" data-type="webp" data-w="1080" style="box-shadow: rgb(180, 180, 180) 0px 0px 0.5em 0px;background-color: transparent;margin-bottom: 0px;width: 645px !important;height: auto;" type="block" src="https://wechat2rss.xlab.app/img-proxy/?k=d8fa8e0d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FR6iaFp0bicyN6gyLfLPOfqibUkIagvpKOzic6TLnEnBYNobVYGwGZJDLvhiah6tlshEJ7JibseiaIktBpwSBNXrgOB4icw%2F640%3Fwx_fmt%3Djpeg%26from%3Dappmsg"/></span></p><p style="margin-left: 16px;margin-right: 16px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">需要注意的是，教学事故的认定范围并不只针对专任教师，还针对兼职、外聘、教学管理人员和教学辅助人员等其他人员。有学校对教学事故的定义为由于任课（专兼职、外聘）教师、教学管理人员和教学辅助人员违反或不执行教学规章制度，不履行或未能有效履行工作职责，而对教学秩序、教学工作和教学质量等产生不良影响和后果的行为或事件。凡教学规章制度中要求执行而未执行的，或教学规章制度中禁为而做了的，均属教学事故。</span></span></p><p style="margin-left: 16px;margin-right: 16px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">文首提到的发生二级事故并解除聘用合同的正是一名外聘教师。其他高校针对外聘教师发生相关教学事故也有作出相应处理。如广东某高校明确，外聘教师发生Ⅱ级或Ⅰ级事故，不再聘任担任教学任务。</span></span></p><p style="margin-left: 16px;margin-right: 16px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">陕西某高校部门专门针对外聘教师发布了教学事故认定和处理办法，将外聘教师教学事故等级分为一般、严重、重大事故。一般事故被通报批评，严重事故扣除课酬10%并通报批评，重大事故直接予以解聘。同时，两次一般教学事故计一次严重教学事故，两次严重教学事故计一次重大教学事故。</span></span></p><p style="margin-left: 16px;margin-right: 16px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">此外，教学事故的认定各学校也有一定的规范流程。从武汉传媒学院近期发布的教学事故认定流程图，我们或许也能窥见一二。</span></span></p><p style="margin-left: 16px;margin-right: 16px;line-height: 1.75em;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><img data-imgfileid="100293430" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="1.3055555555555556" data-s="300,640" data-type="webp" data-w="720" style="box-shadow: rgb(180, 180, 180) 0px 0px 0.5em 0px;background-color: transparent;margin-bottom: 0px;width: 645px !important;height: auto;" type="block" src="https://wechat2rss.xlab.app/img-proxy/?k=27a7370e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FR6iaFp0bicyN6gyLfLPOfqibUkIagvpKOzicPmg5uvSUNhichqGAtP5j0zP9r8zzHxTgrIkicjDEwu9LQC6wFezibw9Hw%2F640%3Fwx_fmt%3Djpeg%26from%3Dappmsg"/></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 14px;color: rgb(136, 136, 136);">图片来源：武汉传媒学院网站</span></span></p><div data-mpa-template="t" mpa-data-temp-power-by="yiban.io" mpa-from-tpl="t" data-mpa-action-id="measa8rtogi" style="margin-bottom: 24px;"><div style="width: 100%;display: flex;justify-content: center;align-items: center;margin-bottom: 0px;" data-mid="" mpa-from-tpl="t"><div style="display: flex;justify-content: flex-start;align-items: center;flex-direction: column;margin-bottom: 0px;" data-mid="" mpa-from-tpl="t"><div data-mid="" mpa-from-tpl="t" style="z-index: 1;background: url(https://mmbiz.qpic.cn/mmbiz_png/ZGEv25p8UdFZ1S3KsDOMrQ7GXrZPKoAOJjSGhoufRvRKFzsyA84aF8Mcz7HkjcwsrZek6I8Ziczv4em8v2wxjsQ/640?from=appmsg) 0% 0% / 19px 42px repeat rgb(223, 242, 249);width: 100%;text-align: center;padding: 8px 22px;margin-bottom: 0px;"><p yb-mpa-mark="mark-style-text" style="font-weight: bold;font-size: 18px;color: rgb(37, 117, 149);line-height: 25px;margin-bottom: 0px;" data-mid=""><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;">教学事故，目的不是处罚</span></span></p></div><div style="display: flex;justify-content: flex-start;align-items: center;flex-direction: column;align-self: flex-end;margin-bottom: 0px;" data-mid="" mpa-from-tpl="t"><p nodeleaf="" style="width: 80px;display: flex;justify-content: center;align-items: center;align-self: flex-end;margin-top: -25px;margin-right: -6px;margin-bottom: 0px;" data-mid="" mpa-from-tpl="t"><img style="display: block;background-color: transparent;margin-bottom: 0px;width: 80px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.3125" data-w="160" src="https://wechat2rss.xlab.app/img-proxy/?k=09947b80&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FIVRBzlsfVMDIocfia85P4fibDfx58oebbvK5gqI89KajXkEvHOvysxJhpgvoKAGWsMic63dLlQkjFNX4gFUicTsM1g%2F640%3Ffrom%3Dappmsg"/></p></div></div></div></div><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 16px;margin-right: 16px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">近些年，部分高校教师因被判定教学事故在网上引起了热议，有人认为简单的迟到就被认定重大教学事故是否处理过重。</span></span></p><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 16px;margin-right: 16px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">但高校严格执行教学事故制度，并不是以处罚为目的。该举措的真正目的是限制教职员工可能出现的不规范行为，有效预防和避免各类教学事故的发生，从而维护学校的正常教学秩序，保证教学工作有效运行，提升教学质量。</span></span></p><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 16px;margin-right: 16px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">也因此，部分高校除了颁布相关教学事故的认定和处理办法等，还会通过一些措施让教师尽可能的避免教学事故。如举办预防教学事故的相关讲座，通过各种留言信息提醒教师准时上课等。</span></span></p><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 16px;margin-right: 16px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">即使遇到已经不可避免的事情，高校也会有快速处理的方案。如由于堵车、交通事故、突发生病导致上课迟到现象发生，武汉东湖学院要求老师首先跟教学秘书或教学副院长取得联系，对情况进行说明；教学秘书迅速联系相关班级辅导员和教学副院长或其他院领导，辅导员迅速通知相关班级班干部，进行情况说明，稳定学生情绪；教学副院长或其他院领导和辅导员迅速赶到上课教室，控制课堂纪律，耐心等待任课老师到来；万一无法继续上课，由教学秘书迅速办理调停课手续，并做好补课准备。</span></span></p><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 16px;margin-right: 16px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">教学事故的处理，是高校教学管理的重要内容之一。可以说</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(171, 25, 66);font-weight: bold;">高校对教学事故的管理是高校对教职工在教学过程中的基本行为要求。但教学事故的认定和处理也与教职工的切身利益相关，在制度制定方面，高校也需要根据现实情况不断规范和完善，让其更为合理</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(98, 98, 98);">。</span></span></p><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247526291">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=df4f802a&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526291%26idx%3D1%26sn%3D0381daf4d883fefe91e6ea5cfcc673de">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 14 Aug 2025 17:38:00 +0800</pubDate>
    </item>
    <item>
      <title>【Python】100个Python正则表达式技巧，让你从入门到精通</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526291&amp;idx=2&amp;sn=0848f2546a224d61d886fc5b2d76f785</link>
      <description></description>
      <content:encoded><![CDATA[<p>
<span>学研妹</span> <span>2025-08-14 17:38</span> <span style="display: inline-block;">浙江</span>
</p>




<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=70f3d6ad&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FhTYhvCJkfDdnsy0m8JUVJhc6PoPiaqreAEKRCFtlt1JmfGxVkicKcZrtLqGGPFoRCgN023Ejibic2VLokwlCSwFb5w%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<div data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="" data-pm-slice="0 0 []"><blockquote style="margin-top: 20px;margin-bottom: 20px;margin-left: 0px;margin-right: 0px;padding-top: 10px;padding-bottom: 10px;padding-left: 20px;padding-right: 10px;border-top-style: none;border-bottom-style: none;border-left-style: solid;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgb(239, 112, 96);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;background-attachment: scroll;background-clip: border-box;background-color: rgb(255, 249, 249);background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;display: block;overflow-x: auto;overflow-y: auto;"><span style="display: none;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.5em;letter-spacing: 0px;text-align: left;font-weight: normal;"></span><p style="text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;color: rgb(0, 0, 0);font-size: 15px;line-height: 1.8em;letter-spacing: 0px;text-align: left;font-weight: normal;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 0px;"><span leaf="">掌握 Python 正则表达式：100个实用技巧与案例。</span></p></blockquote><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"></figure><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf=""><img data-imgfileid="100032651" alt="Structural Pattern Matching in Python I" class="rich_pages wxw-img" data-ratio="0.5712962962962963" data-type="jpeg" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=2278d1ee&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FhTYhvCJkfDdnsy0m8JUVJhc6PoPiaqreAdriahRNiaxW5o4FSNVm3lMgDAojh2RxoSyy9h0cMU5ZfCMa1icrXL7mBA%2F640%3Fwx_fmt%3Djpeg%26from%3Dappmsg"/></span></p><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">正则表达式（regex 或 regexp）是 Python 中用于模式匹配与文本处理的强大工具。其语法简洁灵活，能够精准描述字符串中的各类模式，在数据提取、格式验证、文本清洗等场景中发挥着重要作用。</span></p><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">本文系统梳理了 Python 正则表达式的高级特性与一系列使用技巧，帮助读者快速掌握！</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">一、特性</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">1.正则表达式简介</span></span><span style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">正则表达式是定义搜索模式的字符序列，是用于字符串匹配和处理的多功能工具。在 Python 中，</span><code style=""><span leaf="">re</span></code><span leaf=""> 模块提供了对正则表达式的支持。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span></code></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">2.基本模式</span></span><span style="display: none;"></span></h3><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 18px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">2.1 字面字符</span></span><span style="display: none;"></span></h4><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;hello&#39;</span></span><span leaf="">)</span><span leaf="">result = pattern.match(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;hello world&#39;</span></span><span leaf="">)</span><span leaf="">print(result.group())  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 输出：&#39;hello&#39;</span></span></code></pre><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 18px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">2.2 字符类</span></span><span style="display: none;"></span></h4><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;[aeiou]&#39;</span></span><span leaf="">)</span><span leaf="">result = pattern.findall(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;hello world&#39;</span></span><span leaf="">)</span><span leaf="">print(result)  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 输出：[&#39;e&#39;, &#39;o&#39;, &#39;o&#39;]</span></span></code></pre><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 18px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">2.3 通配符 </span><code><span leaf="">.</span></code></span><span style="display: none;"></span></h4><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;he..o&#39;</span></span><span leaf="">)</span><span leaf="">result = pattern.match(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;hello world&#39;</span></span><span leaf="">)</span><span leaf="">print(result.group())  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 输出：&#39;hello&#39;</span></span></code></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">3.量词</span></span><span style="display: none;"></span></h3><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 18px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">3.1 </span><code><span leaf="">*</span></code><span leaf="">、</span><code><span leaf="">+</span></code><span leaf="">、</span><code><span leaf="">?</span></code></span><span style="display: none;"></span></h4><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;ab*c&#39;</span></span><span leaf="">)</span><span leaf="">result = pattern.match(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;ac&#39;</span></span><span leaf="">)</span><span leaf="">print(result.group())  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 输出：&#39;ac&#39;</span></span></code></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">4.锚点</span></span><span style="display: none;"></span></h3><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 18px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">4.1 </span><code><span leaf="">^</span></code><span leaf="">（字符串开头）和 </span><code><span leaf="">$</span></code><span leaf="">（字符串结尾）</span></span><span style="display: none;"></span></h4><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^hello&#39;</span></span><span leaf="">)</span><span leaf="">result = pattern.match(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;hello world&#39;</span></span><span leaf="">)</span><span leaf="">print(result.group())  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 输出：&#39;hello&#39;</span></span></code></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">5.字符转义</span></span><span style="display: none;"></span></h3><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\d+&#39;</span></span><span leaf="">)  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配一个或多个数字</span></span><span leaf="">result = pattern.match(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;123&#39;</span></span><span leaf="">)</span><span leaf="">print(result.group())  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 输出：&#39;123&#39;</span></span></code></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">6.字符集和范围</span></span><span style="display: none;"></span></h3><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;[a-z]&#39;</span></span><span leaf="">)</span><span leaf="">result = pattern.findall(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;Hello World&#39;</span></span><span leaf="">)</span><span leaf="">print(result)  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 输出：[&#39;e&#39;, &#39;l&#39;, &#39;l&#39;, &#39;o&#39;, &#39;o&#39;, &#39;r&#39;, &#39;l&#39;, &#39;d&#39;]</span></span></code></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">7.分组和捕获</span></span><span style="display: none;"></span></h3><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(\d+)-(\d+)-(\d+)&#39;</span></span><span leaf="">)</span><span leaf="">result = pattern.match(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;2023-11-25&#39;</span></span><span leaf="">)</span><span leaf="">print(result.groups())  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 输出：(&#39;2023&#39;, &#39;11&#39;, &#39;25&#39;)</span></span></code></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">8.高级模式</span></span><span style="display: none;"></span></h3><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 18px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">8.1 前瞻和后顾</span></span><span style="display: none;"></span></h4><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(?&lt;=@)\w+&#39;</span></span><span leaf="">)</span><span leaf="">result = pattern.findall(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;user@example.com&#39;</span></span><span leaf="">)</span><span leaf="">print(result)  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 输出：[&#39;example&#39;]</span></span></code></pre><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 18px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">8.2 非捕获组</span></span><span style="display: none;"></span></h4><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(?:\d+)-(\d+)-(\d+)&#39;</span></span><span leaf="">)</span><span leaf="">result = pattern.match(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;2023-11-25&#39;</span></span><span leaf="">)</span><span leaf="">print(result.groups())  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 输出：(&#39;11&#39;, &#39;25&#39;)</span></span></code></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">9.Python 中正则表达式的使用</span></span><span style="display: none;"></span></h3><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 18px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">9.1 </span><code><span leaf="">match</span></code><span leaf=""> 与 </span><code><span leaf="">search</span></code></span><span style="display: none;"></span></h4><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;world&#39;</span></span><span leaf="">)</span><span leaf="">result = pattern.match(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;hello world&#39;</span></span><span leaf="">)</span><span leaf="">print(result)  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># None</span></span><span leaf="">result = pattern.search(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;hello world&#39;</span></span><span leaf="">)</span><span leaf="">print(result.group())  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 输出：&#39;world&#39;</span></span></code></pre><h4 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 18px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">9.2 </span><code><span leaf="">findall</span></code></span><span style="display: none;"></span></h4><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\d+&#39;</span></span><span leaf="">)</span><span leaf="">result = pattern.findall(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;There are 25 apples and 30 oranges&#39;</span></span><span leaf="">)</span><span leaf="">print(result)  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 输出：[&#39;25&#39;, &#39;30&#39;]</span></span></code></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">10.替换和替换操作</span></span><span style="display: none;"></span></h3><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\d+&#39;</span></span><span leaf="">)</span><span leaf="">result = pattern.sub(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;X&#39;</span></span><span leaf="">, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;There are 25 apples and 30 oranges&#39;</span></span><span leaf="">)</span><span leaf="">print(result)  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 输出：&#39;There are X apples and X oranges&#39;</span></span></code></pre><h3 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: block;"><span style="display: none;"></span><span style="font-size: 20px;color: rgb(0, 0, 0);line-height: 1.5em;letter-spacing: 0em;text-align: left;font-weight: bold;display: block;"><span leaf="">11.不区分大小写</span></span><span style="display: none;"></span></h3><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;hello&#39;</span></span><span leaf="">, re.IGNORECASE)</span><span leaf="">result = pattern.match(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;HeLLo World&#39;</span></span><span leaf="">)</span><span leaf="">print(result.group())  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 输出：&#39;HeLLo&#39;</span></span></code></pre><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">二、有效使用正则表达式的100个技巧</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">1.通用技巧</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用原始字符串（如 </span><code style=""><span leaf="">r&#39;\d+&#39;</span></code><span leaf="">）以避免意外的转义字符。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">若需多次使用正则表达式模式，建议编译模式以提升性能。</span><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 不编译模式（重复编译）</span></span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> _ </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> range(</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">1000</span></span><span leaf="">):</span><span leaf="">    result = re.match(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\d+&#39;</span></span><span leaf="">, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;123&#39;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 编译模式（仅编译一次）</span></span><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\d+&#39;</span></span><span leaf="">)</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> _ </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> range(</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">1000</span></span><span leaf="">):</span><span leaf="">    result = pattern.match(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;123&#39;</span></span><span leaf="">)</span></code></pre></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">针对多种情况测试正则表达式，确保其正确性。</span><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 示例：匹配电子邮件地址</span></span><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b&#39;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">test_cases = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;user@example.com&#34;</span></span><span leaf="">,             </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 有效的电子邮件</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;user@company.co.uk&#34;</span></span><span leaf="">,           </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 带国家代码的有效电子邮件</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;name123@sub.domain.org&#34;</span></span><span leaf="">,       </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 带子域名的有效电子邮件</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid_email@no_tld&#34;</span></span><span leaf="">,         </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效的电子邮件（无顶级域名）</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;@missing_username.com&#34;</span></span><span leaf="">,        </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效的电子邮件（无用户名）</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;user@invalid_domain&#34;</span></span><span leaf="">,          </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效的电子邮件（域名无效）</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;name@server.c&#34;</span></span><span leaf="">,                </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效的电子邮件（顶级域名过短）</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;name@server.with_space.com&#34;</span></span><span leaf="">,   </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效的电子邮件（域名含空格）</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;user@@double_at.com&#34;</span></span><span leaf="">,          </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效的电子邮件（含两个@）</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;user@excessive_length_domain.&#34;</span></span><span leaf=""> + </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;a&#34;</span></span><span leaf=""> * </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">255</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效的电子邮件（域名过长）</span></span><span leaf="">]</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 用每个测试用例测试模式</span></span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> email </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> test_cases:</span><span leaf="">    match = pattern.match(email)</span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{email}</span></span><span leaf="">：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;有效&#39;</span></span><span leaf=""> </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf=""> </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;无效&#39;</span></span><span leaf="">}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span></code></pre></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">2.字符类</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">利用字符类（如 </span><code style=""><span leaf="">[a-z]</span></code><span leaf="">）匹配指定范围内的任意字符。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用否定（字符类中的 </span><code style=""><span leaf="">^</span></code><span leaf="">）匹配不在指定范围内的字符（如 </span><code style=""><span leaf="">[^0-9]</span></code><span leaf=""> 匹配非数字）。</span></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">3.量词</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">需匹配最小内容时，优先使用非贪婪量词（</span><code style=""><span leaf="">*?</span></code><span leaf="">、</span><code style=""><span leaf="">+?</span></code><span leaf="">）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用贪婪量词（</span><code style=""><span leaf="">*</span></code><span leaf="">、</span><code style=""><span leaf="">+</span></code><span leaf="">）时需谨慎，避免意外的长匹配。</span></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">4.锚点和边界</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用 </span><code style=""><span leaf="">^</span></code><span leaf=""> 和 </span><code style=""><span leaf="">$</span></code><span leaf=""> 分别将模式锚定到行的开头和结尾。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">利用单词边界（</span><code style=""><span leaf="">\b</span></code><span leaf="">）匹配完整单词。</span></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">5.选择和分组</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用选择（</span><code style=""><span leaf="">|</span></code><span leaf="">）匹配多个模式（如 </span><code style=""><span leaf="">cat|dog</span></code><span leaf="">）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">需对模式的特定部分（而非整个模式）应用量词（</span><code style=""><span leaf="">*</span></code><span leaf="">、</span><code style=""><span leaf="">+</span></code><span leaf="">、</span><code style=""><span leaf="">{}</span></code><span leaf="">）或选择（</span><code style=""><span leaf="">|</span></code><span leaf="">）时，分组非常有用。</span></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">6.字符转义</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">熟悉常见的字符转义（</span><code style=""><span leaf="">\d</span></code><span leaf="">、</span><code style=""><span leaf="">\w</span></code><span leaf="">、</span><code style=""><span leaf="">\s</span></code><span leaf="">），分别用于匹配数字、单词字符和空白字符。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">若需匹配特殊字符（如 </span><code style=""><span leaf="">.</span></code><span leaf="">），需转义（如 </span><code style=""><span leaf="">\.</span></code><span leaf="">）。</span></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">7.环视</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用正向前瞻（</span><code style=""><span leaf="">(?=...)</span></code><span leaf="">）匹配后面跟有特定模式的内容。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">利用负向前瞻（</span><code style=""><span leaf="">(?!...)</span></code><span leaf="">）匹配后面不跟特定模式的内容。</span></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">8.替换</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用捕获组在替换中提取并引用匹配字符串的部分内容。</span><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 示例：替换日期格式</span></span><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(\d{1,2})/(\d{1,2})/(\d{4})&#39;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 原始字符串</span></span><span leaf="">text = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;Meeting on 12/25/2022. Deadline is 3/8/2023.&#34;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 使用捕获组进行替换</span></span><span leaf="">result = pattern.sub(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\3-\1-\2&#39;</span></span><span leaf="">, text)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印结果</span></span><span leaf="">print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;原始：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{text}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span leaf="">print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;修改后：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{result}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span></code></pre></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">尝试使用反向引用（</span><code style=""><span leaf="">\1</span></code><span leaf="">、</span><code style=""><span leaf="">\2</span></code><span leaf="">）在替换中引用捕获组。</span></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">9.常见模式</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用 </span><code style=""><span leaf="">\d+</span></code><span leaf=""> 匹配一个或多个数字。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用 </span><code style=""><span leaf="">?</span></code><span leaf=""> 匹配可选字符（如 </span><code style=""><span leaf="">colou?r</span></code><span leaf=""> 匹配 color 或 colour）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用 </span><code style=""><span leaf="">\s+</span></code><span leaf=""> 匹配空白字符。</span></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">10.不区分大小写</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用 </span><code style=""><span leaf="">re.IGNORECASE</span></code><span leaf=""> 标志启用不区分大小写的匹配。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">11.注释</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用 </span><code style=""><span leaf="">(?#comment)</span></code><span leaf=""> 在正则表达式中添加注释，提高可读性。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">12.验证</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用健壮的正则表达式模式验证电子邮件地址。</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">validate_email</span></span><span style="line-height: 26px;"><span leaf="">(email)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 电子邮件验证的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">return</span></span><span leaf=""> bool(pattern.match(email))</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">emails = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;user@example.com&#34;</span></span><span leaf="">,          </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 有效的电子邮件</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;user.name@company.co.uk&#34;</span></span><span leaf="">,   </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 带国家代码的有效电子邮件</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid_email@no_tld&#34;</span></span><span leaf="">,      </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效的电子邮件（无顶级域名）</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;@missing_username.com&#34;</span></span><span leaf="">,     </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效的电子邮件（无用户名）</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;user@invalid_domain&#34;</span></span><span leaf="">,       </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效的电子邮件（域名无效）</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;user@@double_at.com&#34;</span></span><span leaf="">,       </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效的电子邮件（含两个@）</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;user@excessive_length_domain.&#34;</span></span><span leaf=""> + </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;a&#34;</span></span><span leaf=""> * </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">255</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效的电子邮件（域名过长）</span></span><span leaf="">]</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 验证每个电子邮件并打印结果</span></span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> email </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> emails:</span><span leaf="">    result = validate_email(email)</span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{email}</span></span><span leaf="">：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;有效&#39;</span></span><span leaf=""> </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> result </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf=""> </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;无效&#39;</span></span><span leaf="">}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span></code></pre></div></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">^[a-zA-Z0-9._%+-]+</span></code><span leaf="">：匹配用户名部分中一个或多个允许的字符。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">@</span></code><span leaf="">：匹配 </span><code style=""><span leaf="">@</span></code><span leaf=""> 符号。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[a-zA-Z0-9.-]+</span></code><span leaf="">：匹配域名部分中一个或多个允许的字符。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\.</span></code><span leaf="">：匹配顶级域名前的点（.）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[a-zA-Z]{2,}$</span></code><span leaf="">：匹配两个或多个字母的顶级域名。</span></p></li></ul><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">为电话号码创建正则表达式模式。</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">validate_phone_number</span></span><span style="line-height: 26px;"><span leaf="">(phone_number)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 带或不带连字符的美国电话号码的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^\+?1?\s*[-.]?\s*\(?\d{3}\)?[-.]?\s*\d{3}[-.]?\s*\d{4}$&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">return</span></span><span leaf=""> bool(pattern.match(phone_number))</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">phone_numbers = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;+1 123-456-7890&#34;</span></span><span leaf="">,     </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 带国家代码的有效电话号码</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;123.456.7890&#34;</span></span><span leaf="">,        </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 带点的有效电话号码</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;(123) 456-7890&#34;</span></span><span leaf="">,      </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 带括号的有效电话号码</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;1234567890&#34;</span></span><span leaf="">,          </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无连字符的有效电话号码</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;987-654-3210&#34;</span></span><span leaf="">,        </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无国家代码的有效电话号码</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid_phone_number&#34;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效的电话号码</span></span><span leaf="">]</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 验证每个电话号码并打印结果</span></span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> phone_number </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> phone_numbers:</span><span leaf="">    result = validate_phone_number(phone_number)</span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{phone_number}</span></span><span leaf="">：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;有效&#39;</span></span><span leaf=""> </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> result </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf=""> </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;无效&#39;</span></span><span leaf="">}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span></code></pre></div></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">^</span></code><span leaf="">：断言字符串的开头。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\+?1?</span></code><span leaf="">：匹配可选的 </span><code style=""><span leaf="">+</span></code><span leaf=""> 和可选的 </span><code style=""><span leaf="">1</span></code><span leaf="">（国家代码）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\s*[-.]?\s*</span></code><span leaf="">：匹配可选的空格和可选的连字符或点。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\(?\d{3}\)?</span></code><span leaf="">：匹配可选的左括号、三个数字和可选的右括号。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[-.]?\s*\d{3}[-.]?\s*\d{4}$</span></code><span leaf="">：匹配可选的连字符或点、可选的空格、三个数字、可选的连字符或点、可选的空格，以及结尾的四个数字。</span></p></li></ul><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">为邮政编码创建正则表达式模式。</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">validate_zip_code</span></span><span style="line-height: 26px;"><span leaf="">(zip_code)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 美国邮政编码的正则表达式模式（5位或9位）</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^\d{5}(?:[-\s]\d{4})?$&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">return</span></span><span leaf=""> bool(pattern.match(zip_code))</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">zip_codes = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;12345&#34;</span></span><span leaf="">,            </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 有效的5位邮政编码</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;98765-4321&#34;</span></span><span leaf="">,       </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 带连字符的有效的9位邮政编码</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;56789 1234&#34;</span></span><span leaf="">,       </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 带空格的有效的9位邮政编码</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid_zip_code&#34;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效的邮政编码</span></span><span leaf="">]</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 验证每个邮政编码并打印结果</span></span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> zip_code </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> zip_codes:</span><span leaf="">    result = validate_zip_code(zip_code)</span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{zip_code}</span></span><span leaf="">：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;有效&#39;</span></span><span leaf=""> </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> result </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf=""> </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;无效&#39;</span></span><span leaf="">}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span></code></pre></div></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">^</span></code><span leaf="">：断言字符串的开头。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\d{5}</span></code><span leaf="">：匹配5位数字（5位邮政编码）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?:[-\s]\d{4})?</span></code><span leaf="">：使用非捕获组使最后四位数字可选，允许带可选连字符或空格的9位邮政编码格式。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">$</span></code><span leaf="">：断言字符串的结尾。</span></p></li></ul></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">13.转义用户输入</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">将用户输入纳入正则表达式时，务必转义用户输入，以防止注入攻击。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">search_string_in_text</span></span><span style="line-height: 26px;"><span leaf="">(user_input, text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在正则表达式中使用用户输入前安全转义</span></span><span leaf="">    escaped_user_input = re.escape(user_input)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在正则表达式模式中使用转义后的用户输入</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#39;\\b</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{escaped_user_input}</span></span><span leaf="">\\b&#39;</span></span><span leaf="">, re.IGNORECASE)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中搜索转义后的用户输入</span></span><span leaf="">    match = pattern.search(text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印结果</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> match:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;找到：&#39;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{user_input}</span></span><span leaf="">&#39; 在 &#39;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{text}</span></span><span leaf="">&#39; 中&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;未找到：&#39;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{user_input}</span></span><span leaf="">&#39; 在 &#39;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{text}</span></span><span leaf="">&#39; 中&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 用用户输入和文本测试</span></span><span leaf="">search_string_in_text(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;.*&#34;</span></span><span leaf="">, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;这是一段简单的文本。&#34;</span></span><span leaf="">)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">re.escape(user_input)</span></code><span leaf="">：</span><code style=""><span leaf="">re.escape()</span></code><span leaf=""> 函数转义用户输入中的特殊字符，确保它们被视为字面字符而非正则表达式语法的一部分。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\\b{escaped_user_input}\\b</span></code><span leaf="">：</span><code style=""><span leaf="">{escaped_user_input}</span></code><span leaf=""> 被纳入正则表达式模式，前后包围 </span><code style=""><span leaf="">\b</span></code><span leaf=""> 单词边界以匹配确切的单词。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">re.IGNORECASE</span></code><span leaf="">：</span><code style=""><span leaf="">re.IGNORECASE</span></code><span leaf=""> 标志用于执行不区分大小写的搜索。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">14.命名组</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用命名组（</span><code style=""><span leaf="">(?P&lt;name&gt;...)</span></code><span leaf="">）提高可读性，并通过名称引用捕获的组。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">15.详细模式</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">启用详细模式（</span><code style=""><span leaf="">re.VERBOSE</span></code><span leaf=""> 或 </span><code style=""><span leaf="">re.X</span></code><span leaf="">），允许模式中包含空格和注释，提高可读性。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">16.非捕获组</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用非捕获组 </span><code style=""><span leaf="">(?:...)</span></code><span leaf=""> 进行分组，而不创建捕获组。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">17.Unicode 字符</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">考虑使用 </span><code style=""><span leaf="">\p{L}</span></code><span leaf=""> 匹配任何 Unicode 字母。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">18.转义点号</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">若需匹配字面点号，使用 </span><code style=""><span leaf="">\.</span></code><span leaf="">。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">19.验证 URL</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">创建正则表达式模式验证 URL。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">validate_url</span></span><span style="line-height: 26px;"><span leaf="">(url)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 验证 URL 的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span leaf="">        </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^(https?|ftp):\/\/&#39;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 协议（http、https、ftp）</span></span><span leaf="">        </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?|[0-9]{1,3}\.?|[A-Z0-9-]+\.?)&#39;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 域名</span></span><span leaf="">        </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(?:\/[^\s]*)?$&#39;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 路径</span></span><span leaf="">        , re.IGNORECASE</span><span leaf="">    )</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">return</span></span><span leaf=""> bool(pattern.match(url))</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">urls = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;<a href="http://www.example.com" target="_blank">http://www.example.com</a>&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;<a href="https://example.com/path" target="_blank">https://example.com/path</a>&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;ftp://ftp.example.net/file.txt&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid-url&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;ftp://invalid_domain&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;<a href="https://example_with_underscores.com" target="_blank">https://example_with_underscores.com</a>&#34;</span></span><span leaf="">]</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 验证每个 URL 并打印结果</span></span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> url </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> urls:</span><span leaf="">    result = validate_url(url)</span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{url}</span></span><span leaf="">：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;有效&#39;</span></span><span leaf=""> </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> result </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf=""> </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;无效&#39;</span></span><span leaf="">}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">^(https?|ftp):\/\/</span></code><span leaf="">：匹配协议（http、https 或 ftp）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?: ... | ... )</span></code><span leaf="">：域名选项的非捕获组。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}\.?</span></code><span leaf="">：匹配典型域名（example.com），带可选子域名。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">|[0-9]{1,3}\.?</span></code><span leaf="">：或者，匹配 IP 地址（带可选尾点）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">|[A-Z0-9-]+\.?</span></code><span leaf="">：或者，匹配仅含字母数字的域名（example-with-hyphens.com），带可选尾点。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?:\/[^\s]*)?$</span></code><span leaf="">：匹配字符串末尾的路径（例如，/path/to/resource）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">re.IGNORECASE</span></code><span leaf="">：</span><code style=""><span leaf="">re.IGNORECASE</span></code><span leaf=""> 标志用于执行不区分大小写的匹配。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">20.提取信息</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用捕获组从字符串中提取特定信息。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_email_info</span></span><span style="line-height: 26px;"><span leaf="">(email)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 带捕获组的正则表达式模式，用于提取电子邮件信息</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^([a-zA-Z0-9._%+-]+)@([a-zA-Z0-9.-]+)\.([a-zA-Z]{2,})$&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 用模式匹配电子邮件</span></span><span leaf="">    match = pattern.match(email)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 使用捕获组提取信息</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> match:</span><span leaf="">        username, domain, tld = match.groups()</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;电子邮件：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{email}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;用户名：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{username}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;域名：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{domain}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;顶级域名：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{tld}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;无效的电子邮件格式：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{email}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">emails = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;user@example.com&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;john.doe@company.co.uk&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid_email@no_tld&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;@missing_username.com&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;user@invalid_domain&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;user@@double_at.com&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;user@excessive_length_domain.&#34;</span></span><span leaf=""> + </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;a&#34;</span></span><span leaf=""> * </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">255</span></span><span leaf="">]</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 从每个电子邮件提取信息并打印结果</span></span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> email </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> emails:</span><span leaf="">    extract_email_info(email)</span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;-&#34;</span></span><span leaf=""> * </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">30</span></span><span leaf="">)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">^([a-zA-Z0-9._%+-]+)</span></code><span leaf="">：电子邮件用户名部分的捕获组。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">@</span></code><span leaf="">：匹配 </span><code style=""><span leaf="">@</span></code><span leaf=""> 符号。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">([a-zA-Z0-9.-]+)</span></code><span leaf="">：电子邮件域名部分的捕获组。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\.</span></code><span leaf="">：匹配顶级域名前的点（.）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">([a-zA-Z]{2,})$</span></code><span leaf="">：顶级域名的捕获组。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">match.groups()</span></code><span leaf="">：以元组形式检索捕获的组。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">21.字符集和范围</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用字符集和范围简洁地匹配多个字符。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">match_date_formats</span></span><span style="line-height: 26px;"><span leaf="">(date_string)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 带字符集和范围的正则表达式模式，用于匹配日期格式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^\d{1,2}[/\-]\d{1,2}[/\-]\d{2,4}$&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 检查日期字符串是否匹配模式</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> pattern.match(date_string):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{date_string}</span></span><span leaf=""> 是有效的日期格式。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{date_string}</span></span><span leaf=""> 不是有效的日期格式。&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">date_strings = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;12/25/2022&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;3-8-2023&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid_date&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;2023-12-31&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;15/07/2021&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;22-10-21&#34;</span></span><span leaf="">]</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 每个日期字符串与模式匹配并打印结果</span></span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> date_str </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> date_strings:</span><span leaf="">    match_date_formats(date_str)</span></code></pre><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf="">^\d{1,2}[/\-]\d{1,2}[/\-]\d{2,4}$</span></code><span leaf="">：此正则表达式模式使用字符集和范围匹配不同的日期格式。</span></p><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">^\d{1,2}</span></code><span leaf="">：匹配开头的1或2位数字。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[/\-]</span></code><span leaf="">：匹配斜杠（/）或连字符（-）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\d{1,2}</span></code><span leaf="">：匹配1或2位数字（月份）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[/\-]</span></code><span leaf="">：匹配另一个斜杠（/）或连字符（-）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\d{2,4}$</span></code><span leaf="">：匹配结尾的2、3或4位数字（年份）。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">22.非贪婪字符匹配</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">组合 </span><code style=""><span leaf="">.*?</span></code><span leaf=""> 用于非贪婪匹配任何字符。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">23.匹配整个单词</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用 </span><code style=""><span leaf="">\b</span></code><span leaf=""> 匹配整个单词。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">24.匹配特殊字符</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">要匹配字面意义上的 </span><code style=""><span leaf="">+</span></code><span leaf="">、</span><code style=""><span leaf="">*</span></code><span leaf=""> 和 </span><code style=""><span leaf="">?</span></code><span leaf=""> 等特殊字符，需要转义它们。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">25.组上的量词</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">将量词应用于组以匹配重复模式（例如，</span><code style=""><span leaf="">(ab)+</span></code><span leaf="">）。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">26.匹配日期</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">创建正则表达式模式匹配日期格式。</span></p><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">模式1：MM/DD/YYYY 或 MM-DD-YYYY</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">match_date_format_1</span></span><span style="line-height: 26px;"><span leaf="">(date_string)</span></span><span leaf="">:</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^(0[1-9]|1[0-2])[/\-](0[1-9]|[12][0-9]|3[01])[/\-]\d{4}$&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> pattern.match(date_string):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{date_string}</span></span><span leaf=""> 匹配模式。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{date_string}</span></span><span leaf=""> 不匹配模式。&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">dates_pattern_1 = [</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;12/25/2022&#34;</span></span><span leaf="">, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;03-08-2023&#34;</span></span><span leaf="">, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;15/07/2021&#34;</span></span><span leaf="">, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;2023-12-31&#34;</span></span><span leaf="">, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid_date&#34;</span></span><span leaf="">]</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> date_str </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> dates_pattern_1:</span><span leaf="">    match_date_format_1(date_str)</span></code></pre><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf="">^(0[1-9]|1[0-2])[/\-](0[1-9]|[12][0-9]|3[01])[/\-]\d{4}$</span></code><span leaf="">匹配两位数字的月份、两位数字的日期和四位数字的年份，以斜杠（/）或连字符（-）分隔。</span></p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">模式2：YYYY/MM/DD 或 YYYY-MM-DD</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">match_date_format_2</span></span><span style="line-height: 26px;"><span leaf="">(date_string)</span></span><span leaf="">:</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^\d{4}[/\-](0[1-9]|1[0-2])[/\-](0[1-9]|[12][0-9]|3[01])$&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> pattern.match(date_string):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{date_string}</span></span><span leaf=""> 匹配模式。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{date_string}</span></span><span leaf=""> 不匹配模式。&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">dates_pattern_2 = [</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;2022/12/25&#34;</span></span><span leaf="">, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;2023-03-08&#34;</span></span><span leaf="">, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;2021/15/07&#34;</span></span><span leaf="">, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;2023-12-31&#34;</span></span><span leaf="">, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid_date&#34;</span></span><span leaf="">]</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> date_str </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> dates_pattern_2:</span><span leaf="">    match_date_format_2(date_str)</span></code></pre><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf="">^\d{4}[/\-](0[1-9]|1[0-2])[/\-](0[1-9]|[12][0-9]|3[01])$</span></code><span leaf="">匹配四位数字的年份、两位数字的月份和两位数字的日期，以斜杠（/）或连字符（-）分隔。</span></p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">模式3：DD Month YYYY</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">match_date_format_3</span></span><span style="line-height: 26px;"><span leaf="">(date_string)</span></span><span leaf="">:</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^(0[1-9]|[12][0-9]|3[01])\s+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+\d{4}$&#39;</span></span><span leaf="">, re.IGNORECASE)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> pattern.match(date_string):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{date_string}</span></span><span leaf=""> 匹配模式。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{date_string}</span></span><span leaf=""> 不匹配模式。&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">dates_pattern_3 = [</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;25 Dec 2022&#34;</span></span><span leaf="">, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;08 March 2023&#34;</span></span><span leaf="">, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;15/07/2021&#34;</span></span><span leaf="">, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;31 October 2023&#34;</span></span><span leaf="">, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid_date&#34;</span></span><span leaf="">]</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> date_str </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> dates_pattern_3:</span><span leaf="">    match_date_format_3(date_str)</span></code></pre><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf="">^(0[1-9]|[12][0-9]|3[01])\s+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+\d{4}$</span></code><span leaf="">匹配两位数字的日期、三位字母的月份缩写和四位数字的年份，以空格分隔。</span></p></div></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">27.匹配 HTML 标签</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用正则表达式匹配或提取 HTML 标签中的内容。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_content_from_html</span></span><span style="line-height: 26px;"><span leaf="">(html)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配 HTML 标签内内容的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;&lt;[^&gt;]*&gt;([^&lt;]+)&lt;[^&gt;]*&gt;&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在 HTML 中查找所有匹配项</span></span><span leaf="">    matches = pattern.findall(html)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印提取的内容</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;提取的内容：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{match.strip()}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># HTML 字符串</span></span><span leaf="">html_content = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">&lt;html&gt;</span><span leaf="">  &lt;body&gt;</span><span leaf="">    &lt;h1&gt;Title&lt;/h1&gt;</span><span leaf="">    &lt;p&gt;This is a &lt;strong&gt;sample&lt;/strong&gt; paragraph.&lt;/p&gt;</span><span leaf="">    &lt;div class=&#34;content&#34;&gt;Some &lt;em&gt;italicized&lt;/em&gt; text.&lt;/div&gt;</span><span leaf="">  &lt;/body&gt;</span><span leaf="">&lt;/html&gt;</span><span leaf="">&#34;&#34;&#34;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 从 HTML 标签提取内容</span></span><span leaf="">extract_content_from_html(html_content)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">&lt;[^&gt;]*&gt;</span></code><span leaf="">：匹配开头 HTML 标签（&lt;），后跟零个或多个非 &gt; 字符（</span><code style=""><span leaf="">[^&gt;]*</span></code><span leaf="">），以及结尾 HTML 标签（&gt;）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">([^&lt;]+)</span></code><span leaf="">：用于匹配和提取 HTML 标签内内容的捕获组。它匹配一个或多个非 &lt; 字符。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">&lt;[^&gt;]*&gt;</span></code><span leaf="">：匹配结尾 HTML 标签。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">findall</span></code><span leaf="">：在 HTML 字符串中查找模式的所有出现。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">28.密码验证</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">设计正则表达式模式验证密码强度。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">validate_password_strength</span></span><span style="line-height: 26px;"><span leaf="">(password)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 验证强密码的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span leaf="">        </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^(?=.*[a-z])&#39;</span></span><span leaf="">     </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 至少一个小写字母</span></span><span leaf="">        </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(?=.*[A-Z])&#39;</span></span><span leaf="">      </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 至少一个大写字母</span></span><span leaf="">        </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(?=.*\d)&#39;</span></span><span leaf="">         </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 至少一个数字</span></span><span leaf="">        </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(?=.*[@$!%*?&amp;])&#39;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 至少一个特殊字符</span></span><span leaf="">        </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(?=^[^\s]{8,}$)&#39;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 最小长度为8个字符，不允许空格</span></span><span leaf="">    )</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> pattern.match(password):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{password}</span></span><span leaf=""> 是强密码。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{password}</span></span><span leaf=""> 不符合密码强度标准。&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">passwords = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;StrongPass123!&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;WeakPassword&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;NoSpecialCharacter1&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;Short!23&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;NoUpperLowerCase@1&#34;</span></span><span leaf="">]</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 验证每个密码并打印结果</span></span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> password </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> passwords:</span><span leaf="">    validate_password_strength(password)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?=.*[a-z])</span></code><span leaf="">：至少一个小写字母。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?=.*[A-Z])</span></code><span leaf="">：至少一个大写字母。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?=.*\d)</span></code><span leaf="">：至少一个数字。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?=.*[@$!%*?&amp;])</span></code><span leaf="">：至少一个特殊字符（可自定义这个集合）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?=^[^\s]{8,}$)</span></code><span leaf="">：最小长度为8个字符，且不允许空格。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">29.替换空白字符</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">用单个空格（</span><code style=""><span leaf="">\s+</span></code><span leaf="">）替换连续的空白字符。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">30.提取数字</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用 </span><code style=""><span leaf="">\d+</span></code><span leaf=""> 从字符串中提取数字。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">31.提取 URL</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">创建正则表达式模式从文本中提取 URL。</span></p><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">模式1：基本 URL 提取</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_urls</span></span><span style="line-height: 26px;"><span leaf="">(text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 提取 URL 的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;https?://\S+|www\.\S+&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有匹配项</span></span><span leaf="">    matches = pattern.findall(text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印提取的 URL</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;提取的 URL：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{match}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">text_with_urls = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">Check out this website: <a href="https://www.example.com." target="_blank">https://www.example.com.</a></span><span leaf="">For more information, visit <a href="http://www.another-example.org." target="_blank">http://www.another-example.org.</a></span><span leaf="">&#34;&#34;&#34;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 从文本中提取 URL</span></span><span leaf="">extract_urls(text_with_urls)</span></code></pre></div></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">https?</span></code><span leaf="">：匹配 &#34;http&#34; 或 &#34;https&#34;。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">://</span></code><span leaf="">：匹配 &#34;://&#34;。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\S+</span></code><span leaf="">：匹配一个或多个非空白字符（域名）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">|</span></code><span leaf="">：或运算符。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">www\.\S+</span></code><span leaf="">：匹配 &#34;www.&#34; 后跟一个或多个非空白字符。</span></p></li></ul><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">模式2：扩展 URL 提取</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_urls_extended</span></span><span style="line-height: 26px;"><span leaf="">(text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 提取带可选 www 和查询参数的 URL 的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;https?://(?:www\.)?\S+(?:\?\S+)?&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有匹配项</span></span><span leaf="">    matches = pattern.findall(text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印提取的 URL</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;提取的 URL：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{match}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">text_with_urls_extended = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">Check out this website: <a href="https://www.example.com/path/page?query=123." target="_blank">https://www.example.com/path/page?query=123.</a></span><span leaf="">For more information, visit <a href="http://another-example.org." target="_blank">http://another-example.org.</a></span><span leaf="">&#34;&#34;&#34;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 从文本中提取 URL</span></span><span leaf="">extract_urls_extended(text_with_urls_extended)</span></code></pre></div></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?:www\.)?</span></code><span leaf="">：可选 &#34;www.&#34; 的非捕获组。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?:\?\S+)?)</span></code><span leaf="">：可选查询参数（以 &#34;?&#34; 开头）的非捕获组。</span></p></li></ul></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">32.匹配 HTML 实体</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用正则表达式匹配或替换 HTML 实体。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">from</span></span><span leaf=""> html </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> unescape</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">replace_html_entities</span></span><span style="line-height: 26px;"><span leaf="">(text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配 HTML 实体的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;&amp;[a-zA-Z]+;&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有匹配项</span></span><span leaf="">    matches = pattern.findall(text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 将每个 HTML 实体替换为其解码后的等效字符</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        decoded_entity = unescape(match)</span><span leaf="">        text = text.replace(match, decoded_entity)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">return</span></span><span leaf=""> text</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">html_text = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;This is an example with &lt;b&gt;HTML&lt;/b&gt; entities.&#34;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 替换文本中的 HTML 实体</span></span><span leaf="">result_text = replace_html_entities(html_text)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印结果</span></span><span leaf="">print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;原始文本：&#34;</span></span><span leaf="">, html_text)</span><span leaf="">print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;替换后：&#34;</span></span><span leaf="">, result_text)</span></code></pre><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">正则表达式模式 </span><code style=""><span leaf="">&amp;[a-zA-Z]+;</span></code><span leaf=""> 用于匹配常见的 HTML 实体。然后使用 </span><code style=""><span leaf="">html</span></code><span leaf=""> 模块中的 </span><code style=""><span leaf="">unescape</span></code><span leaf=""> 函数将每个 HTML 实体替换为其解码后的等效字符。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">33.匹配文件路径</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">设计正则表达式模式匹配文件路径。</span></p><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">模式1：Unix/Linux 文件路径</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">match_unix_file_path</span></span><span style="line-height: 26px;"><span leaf="">(path)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配 Unix/Linux 文件路径的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^\/(?:[^\/]+\/)*[^\/]+$&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> pattern.match(path):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{path}</span></span><span leaf=""> 是有效的 Unix/Linux 文件路径。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{path}</span></span><span leaf=""> 不是有效的 Unix/Linux 文件路径。&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">unix_paths = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;/home/user/documents/file.txt&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;/var/www/html/index.html&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;relative/path/to/file&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid\\path\\file.txt&#34;</span></span><span leaf="">]</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> path </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> unix_paths:</span><span leaf="">    match_unix_file_path(path)</span></code></pre></div></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">^</span></code><span leaf="">：断言字符串的开头。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\/</span></code><span leaf="">：匹配根目录（&#34;/&#34;）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?:[^\/]+\/)*</span></code><span leaf="">：非捕获组，匹配零个或多个非斜杠字符后跟斜杠的序列。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[^\/]+$</span></code><span leaf="">：匹配字符串末尾一个或多个非斜杠字符。</span></p></li></ul><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">模式2：Windows 文件路径</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">match_windows_file_path</span></span><span style="line-height: 26px;"><span leaf="">(path)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配 Windows 文件路径的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^[a-zA-Z]:\\(?:[^\\]+\\)*[^\\]+$&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> pattern.match(path):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{path}</span></span><span leaf=""> 是有效的 Windows 文件路径。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{path}</span></span><span leaf=""> 不是有效的 Windows 文件路径。&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">windows_paths = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;C:\\Users\\User\\Documents\\file.txt&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;D:/Projects/project1/code.py&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;\\absolute\\path\\file.txt&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;/unix/style/path/file&#34;</span></span><span leaf="">]</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> path </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> windows_paths:</span><span leaf="">    match_windows_file_path(path)</span></code></pre></div></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">^</span></code><span leaf="">：断言字符串的开头。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[a-zA-Z]:\\</span></code><span leaf="">：匹配驱动器号（例如，&#34;C:&#34;）后跟反斜杠。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?:[^\\]+\\)*</span></code><span leaf="">：非捕获组，匹配零个或多个非反斜杠字符后跟反斜杠的序列。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[^\\]+$</span></code><span leaf="">：匹配字符串末尾一个或多个非反斜杠字符。</span></p></li></ul></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">34.提取电子邮件地址</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">创建正则表达式模式从文本中提取电子邮件地址。</span></p><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">模式1：基本电子邮件地址提取</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_email_addresses</span></span><span style="line-height: 26px;"><span leaf="">(text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 基本电子邮件地址提取的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有匹配项</span></span><span leaf="">    matches = pattern.findall(text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印提取的电子邮件地址</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;提取的电子邮件：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{match}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">text_with_emails = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">Contact us at support@example.com for assistance.</span><span leaf="">Send your inquiries to info@company.org or sales@business.com.</span><span leaf="">Invalid emails: user@invalid, @missing_username.com, email@in@valid.com</span><span leaf="">&#34;&#34;&#34;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 从文本中提取电子邮件地址</span></span><span leaf="">extract_email_addresses(text_with_emails)</span></code></pre><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf="">\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b</span></code></p></div></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\b</span></code><span leaf="">：单词边界，确保匹配整个电子邮件地址。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[A-Za-z0-9._%+-]+</span></code><span leaf="">：匹配电子邮件的用户名部分。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">@</span></code><span leaf="">：匹配 </span><code style=""><span leaf="">@</span></code><span leaf=""> 符号。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[A-Za-z0-9.-]+</span></code><span leaf="">：匹配域名。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\.</span></code><span leaf="">：匹配顶级域名前的点。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[A-Z|a-z]{2,}</span></code><span leaf="">：匹配至少2个字符的顶级域名（TLD）。</span></p></li></ul><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">模式2：扩展电子邮件地址提取</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_email_addresses_extended</span></span><span style="line-height: 26px;"><span leaf="">(text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 扩展电子邮件地址提取的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}(?:\.[A-Z|a-z]{2,})?\b&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有匹配项</span></span><span leaf="">    matches = pattern.findall(text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印提取的电子邮件地址</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;提取的电子邮件：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{match}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">text_with_emails_extended = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">Contact us at support@example.com for assistance.</span><span leaf="">Send your inquiries to info@company.org or sales@business.co.uk.</span><span leaf="">Invalid emails: user@invalid, @missing_username.com, email@in@valid.com</span><span leaf="">&#34;&#34;&#34;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 从文本中提取电子邮件地址</span></span><span leaf="">extract_email_addresses_extended(text_with_emails_extended)</span></code></pre><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf="">...(?:\.[A-Z|a-z]{2,})?\b</span></code></p></div></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?: ... )?</span></code><span leaf="">：可选附加子域名的非捕获组。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\.</span></code><span leaf="">：匹配附加子域名前的点。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[A-Z|a-z]{2,}</span></code><span leaf="">：匹配至少2个字符的附加子域名。</span></p></li></ul></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">35.匹配 IPv4 地址</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">设计正则表达式模式匹配 IPv4 地址。</span></p><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">模式1：基本 IPv4 地址匹配</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">match_ipv4_addresses</span></span><span style="line-height: 26px;"><span leaf="">(text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 基本 IPv4 地址匹配的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\b(?:\d{1,3}\.){3}\d{1,3}\b&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有匹配项</span></span><span leaf="">    matches = pattern.findall(text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印匹配的 IPv4 地址</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;匹配的 IPv4 地址：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{match}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">text_with_ipv4 = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">Server 1: 192.168.1.1</span><span leaf="">Server 2: 10.0.0.255</span><span leaf="">Invalid IP: 256.256.256.256</span><span leaf="">&#34;&#34;&#34;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中匹配 IPv4 地址</span></span><span leaf="">match_ipv4_addresses(text_with_ipv4)</span></code></pre><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf="">\b(?:\d{1,3}\.){3}\d{1,3}\b</span></code></p></div></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\b</span></code><span leaf="">：单词边界，确保匹配整个 IPv4 地址。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?:\d{1,3}\.){3}</span></code><span leaf="">：非捕获组，匹配三次 &#34;1-3 位数字后跟点&#34;。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\d{1,3}</span></code><span leaf="">：匹配最后一个八位字节（1-3 位数字）。</span></p></li></ul><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">模式2：扩展 IPv4 地址匹配</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">match_ipv4_addresses_extended</span></span><span style="line-height: 26px;"><span leaf="">(text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 扩展 IPv4 地址匹配的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\b(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)&#39;</span></span><span leaf="">                       </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}\b&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有匹配项</span></span><span leaf="">    matches = pattern.findall(text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印匹配的 IPv4 地址</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;匹配的 IPv4 地址：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{match}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">text_with_ipv4_extended = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">Server 1: 192.168.1.1</span><span leaf="">Server 2: 10.0.0.255</span><span leaf="">Invalid IP: 256.256.256.256</span><span leaf="">&#34;&#34;&#34;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中匹配 IPv4 地址</span></span><span leaf="">match_ipv4_addresses_extended(text_with_ipv4_extended)</span></code></pre><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf="">\b(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)</span></code></p></div></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?: ... ){3}</span></code><span leaf="">：非捕获组，匹配三次以下模式。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">25[0-5]</span></code><span leaf="">：匹配 250 到 255 之间的数字。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">2[0-4][0-9]</span></code><span leaf="">：匹配 200 到 249 之间的数字。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[01]?[0-9][0-9]?</span></code><span leaf="">：匹配 0 到 199 之间的数字。</span></p></li></ul></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">36.转义符上的量词</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">将量词直接应用于转义符（例如，</span><code style=""><span leaf="">\d{3}</span></code><span leaf=""> 匹配三位数字）。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">37.匹配信用卡号</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">创建正则表达式模式匹配或验证信用卡号。</span></p><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">模式1：基本信用卡号验证</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">validate_credit_card_number_basic</span></span><span style="line-height: 26px;"><span leaf="">(card_number)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 基本信用卡号验证的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^\d{13,19}$&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> pattern.match(card_number):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{card_number}</span></span><span leaf=""> 可能是有效的信用卡号。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{card_number}</span></span><span leaf=""> 不是有效的信用卡号。&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">credit_cards_basic = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;1234567890123&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;4567-8901-2345-6789&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;1234 5678 9012 3456&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid_card&#34;</span></span><span leaf="">,</span><span leaf="">]</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> card </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> credit_cards_basic:</span><span leaf="">    validate_credit_card_number_basic(card)</span></code></pre><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf="">^\d{13,19}$</span></code><span leaf="">：匹配长度在13到19个字符之间的数字字符串。</span></p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">模式2：带卢恩算法的信用卡号验证</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">validate_credit_card_number_luhn</span></span><span style="line-height: 26px;"><span leaf="">(card_number)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 带卢恩算法的信用卡号验证的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^\d{13,19}$&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span style="color: #c678dd;line-height: 26px;"><span leaf="">not</span></span><span leaf=""> pattern.match(card_number):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{card_number}</span></span><span leaf=""> 不是有效的信用卡号。&#34;</span></span><span leaf="">)</span><span leaf="">        </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">return</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 移除非数字字符</span></span><span leaf="">    digits = [int(digit) </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> digit </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> card_number </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> digit.isdigit()]</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 应用卢恩算法</span></span><span leaf="">    total = sum(digits[::</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">-2</span></span><span leaf="">] + [sum(divmod(d * </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">2</span></span><span leaf="">, </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">10</span></span><span leaf="">)) </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> d </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> digits[</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">-2</span></span><span leaf="">::</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">-2</span></span><span leaf="">]])</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> total % </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">10</span></span><span leaf=""> == </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">0</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{card_number}</span></span><span leaf=""> 是有效的信用卡号。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{card_number}</span></span><span leaf=""> 不是有效的信用卡号。&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">credit_cards_luhn = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;1234567890123&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;4567-8901-2345-6789&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;1234 5678 9012 3456&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid_card&#34;</span></span><span leaf="">,</span><span leaf="">]</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> card </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> credit_cards_luhn:</span><span leaf="">    validate_credit_card_number_luhn(card)</span></code></pre></div></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">^\d{13,19}$</span></code><span leaf="">：与基本模式相同，用于初始数字验证。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">卢恩算法用于检查信用卡号的有效性。</span></p></li></ul></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">38.匹配特定单词</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用 </span><code style=""><span leaf="">\b</span></code><span leaf=""> 匹配较大文本中的特定单词。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">39.转义字符</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用 </span><code style=""><span leaf="">\</span></code><span leaf=""> 转义特殊字符，如 </span><code style=""><span leaf="">^</span></code><span leaf="">、</span><code style=""><span leaf="">$</span></code><span leaf="">、</span><code style=""><span leaf="">(</span></code><span leaf="">、</span><code style=""><span leaf="">)</span></code><span leaf="">、</span><code style=""><span leaf="">[</span></code><span leaf="">、</span><code style=""><span leaf="">]</span></code><span leaf="">、</span><code style=""><span leaf="">{</span></code><span leaf="">、</span><code style=""><span leaf="">}</span></code><span leaf="">、</span><code style=""><span leaf="">.</span></code><span leaf="">、</span><code style=""><span leaf="">*</span></code><span leaf="">、</span><code style=""><span leaf="">+</span></code><span leaf="">、</span><code style=""><span leaf="">?</span></code><span leaf="">、</span><code style=""><span leaf="">|</span></code><span leaf="">、</span><code style=""><span leaf="">\</span></code><span leaf="">。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">在非特殊字符前使用 </span><code style=""><span leaf="">\</span></code><span leaf=""> 以字面匹配它。</span></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">40.Unicode 和单词边界</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用 </span><code style=""><span leaf="">\b</span></code><span leaf=""> 作为单词边界，</span><code style=""><span leaf="">\B</span></code><span leaf=""> 作为非单词边界。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">对于 Unicode 单词边界，结合 </span><code style=""><span leaf="">re.UNICODE</span></code><span leaf=""> 标志使用 </span><code style=""><span leaf="">\b</span></code><span leaf="">。</span></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">41.匹配或排除字符</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用 </span><code style=""><span leaf="">.</span></code><span leaf=""> 匹配除换行符外的任何字符。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用 </span><code style=""><span leaf="">[^...]</span></code><span leaf=""> 匹配不在指定集合中的任何字符。</span></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">42.量词组合</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">组合量词以提高灵活性（例如，</span><code style=""><span leaf="">a{2,4}</span></code><span leaf=""> 匹配 &#39;aa&#39;、&#39;aaa&#39; 或 &#39;aaaa&#39;）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用 </span><code style=""><span leaf="">{0,}</span></code><span leaf=""> 或 </span><code style=""><span leaf="">*</span></code><span leaf=""> 表示零次或多次出现。</span></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">43.分组和选择</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用括号进行分组，并对序列应用量词。</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 包含电话号码的示例文本</span></span><span leaf="">text = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">Phone Numbers:</span><span leaf="">- (555) 123-4567</span><span leaf="">- (123) 456-7890</span><span leaf="">- (987) 654-3210</span><span leaf="">&#34;&#34;&#34;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 带分组和量词的正则表达式模式，用于匹配电话号码</span></span><span leaf="">pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\(\d{3}\) \d{3}-\d{4}&#39;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有匹配项</span></span><span leaf="">matches = pattern.findall(text)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印匹配的电话号码</span></span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;匹配的电话号码：&#34;</span></span><span leaf="">, match)</span></code></pre></div></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\(</span></code><span leaf="">：匹配左括号。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\d{3}</span></code><span leaf="">：匹配恰好三位数字。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\)</span></code><span leaf="">：匹配右括号。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""></code><span leaf="">：匹配空格。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\d{3}</span></code><span leaf="">：匹配恰好三位数字。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">-</span></code><span leaf="">：匹配连字符。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\d{4}</span></code><span leaf="">：匹配恰好四位数字。</span></p></li></ul><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">利用 </span><code style=""><span leaf="">(?:...)</span></code><span leaf=""> 作为非捕获组。</span></p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">利用选择匹配多个可能的模式（例如，</span><code style=""><span leaf="">cat|dog|bird</span></code><span leaf="">）。</span></p></div></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">44.替换中的捕获组</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">在替换模式中使用 </span><code style=""><span leaf="">\1</span></code><span leaf="">、</span><code style=""><span leaf="">\2</span></code><span leaf=""> 等利用捕获组。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">对命名捕获组使用 </span><code style=""><span leaf="">\g&lt;name&gt;</span></code><span leaf="">。</span></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">45.环视</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用正向后顾（</span><code style=""><span leaf="">(?&lt;=...)</span></code><span leaf="">）匹配前面有特定模式的内容。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">应用负向后顾（</span><code style=""><span leaf="">(?&lt;!...)</span></code><span leaf="">）匹配前面没有特定模式的内容。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">利用正向前瞻（</span><code style=""><span leaf="">(?=...)</span></code><span leaf="">）匹配后面有特定模式的内容。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">利用负向前瞻（</span><code style=""><span leaf="">(?!...)</span></code><span leaf="">）匹配后面没有特定模式的内容。</span></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">46.命名捕获组</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用命名捕获组提高代码可读性。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用 </span><code style=""><span leaf="">match.group(&#39;name&#39;)</span></code><span leaf=""> 访问命名捕获组。</span></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">47.详细模式</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">启用详细模式（</span><code style=""><span leaf="">re.VERBOSE</span></code><span leaf=""> 或 </span><code style=""><span leaf="">re.X</span></code><span leaf="">），支持多行模式和注释。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">将复杂模式拆分为多行，提高可读性。</span><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 包含电子邮件地址的示例文本</span></span><span leaf="">text = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">Email Addresses:</span><span leaf="">- user@example.com</span><span leaf="">- john.doe@company.org</span><span leaf="">- contact@my-website.co.uk</span><span leaf="">&#34;&#34;&#34;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 带换行符的正则表达式模式，提高可读性</span></span><span leaf="">pattern = re.compile(</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\b&#39;</span></span><span leaf="">                    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 单词边界</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;[a-zA-Z0-9._%+-]+@&#39;</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 用户名部分</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;[a-zA-Z0-9.-]+\.&#39;</span></span><span leaf="">      </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 域名部分（第一级）</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;[A-Z|a-z]{2,}&#39;</span></span><span leaf="">         </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 域名部分（顶级）</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\b&#39;</span></span><span leaf="">                    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 单词边界</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有匹配项</span></span><span leaf="">matches = pattern.findall(text)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印匹配的电子邮件地址</span></span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;匹配的电子邮件地址：&#34;</span></span><span leaf="">, match)</span></code></pre></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">48.标志和模式</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">利用标志，如 </span><code style=""><span leaf="">re.IGNORECASE</span></code><span leaf=""> 进行不区分大小写的匹配。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">使用按位 OR 组合多个标志（例如，</span><code style=""><span leaf="">re.IGNORECASE | re.MULTILINE</span></code><span leaf="">）。</span></p></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">49.验证和提取电子邮件域名</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用正则表达式模式验证电子邮件域名。</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">validate_email_domain</span></span><span style="line-height: 26px;"><span leaf="">(email)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 基本电子邮件地址验证的正则表达式模式</span></span><span leaf="">    email_pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 检查电子邮件地址是否匹配模式</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span style="color: #c678dd;line-height: 26px;"><span leaf="">not</span></span><span leaf=""> email_pattern.match(email):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{email}</span></span><span leaf=""> 不是有效的电子邮件地址。&#34;</span></span><span leaf="">)</span><span leaf="">        </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">return</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 从电子邮件地址提取域名</span></span><span leaf="">    domain_pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b&#39;</span></span><span leaf="">)</span><span leaf="">    domain_match = domain_pattern.search(email)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> domain_match:</span><span leaf="">        domain = domain_match.group()[</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">1</span></span><span leaf="">:]</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{email}</span></span><span leaf=""> 的域名是 </span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{domain}</span></span><span leaf="">。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;无法从 </span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{email}</span></span><span leaf=""> 提取域名。&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">emails = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;user@example.com&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;john.doe@company.org&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid-email&#34;</span></span><span leaf="">,</span><span leaf="">]</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> email </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> emails:</span><span leaf="">    validate_email_domain(email)</span></code></pre><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">请注意，这种方法有局限性，不能保证域名的有效性。对于更可靠的解决方案，考虑使用专门的电子邮件验证库或服务。使用 DNS 查找验证域名是更可靠的方法，但需要正则表达式之外的额外步骤。</span></p></div></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">email_pattern</span></code><span leaf=""> 正则表达式与基本电子邮件地址验证中使用的相同。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">domain_pattern</span></code><span leaf=""> 正则表达式用于从电子邮件地址提取域名部分。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b</span></code><span leaf="">：匹配 </span><code style=""><span leaf="">@</span></code><span leaf=""> 符号后的域名部分。</span></p></li></ul><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用模式中的捕获组提取电子邮件域名。</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_email_domain</span></span><span style="line-height: 26px;"><span leaf="">(email)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 带捕获组的正则表达式模式，用于提取电子邮件域名</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\b[A-Za-z0-9._%+-]+@([A-Za-z0-9.-]+\.[A-Z|a-z]{2,})\b&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 用模式匹配电子邮件地址</span></span><span leaf="">    match = pattern.search(email)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> match:</span><span leaf="">        domain = match.group(</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">1</span></span><span leaf="">)</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{email}</span></span><span leaf=""> 的域名是 </span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{domain}</span></span><span leaf="">。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;无法从 </span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{email}</span></span><span leaf=""> 提取域名。&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">emails = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;user@example.com&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;john.doe@company.org&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid-email&#34;</span></span><span leaf="">,</span><span leaf="">]</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> email </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> emails:</span><span leaf="">    extract_email_domain(email)</span></code></pre><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf="">\b[A-Za-z0-9._%+-]+@([A-Za-z0-9.-]+\.[A-Z|a-z]{2,})\b</span></code></p><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf="">group(1)</span></code><span leaf=""> 方法用于提取第一个（也是唯一一个）捕获组捕获的内容，即电子邮件域名。</span></p></div></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\b</span></code><span leaf="">：单词边界，确保匹配整个电子邮件地址。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[A-Za-z0-9._%+-]+</span></code><span leaf="">：匹配电子邮件的用户名部分。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">@</span></code><span leaf="">：匹配 </span><code style=""><span leaf="">@</span></code><span leaf=""> 符号。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">([A-Za-z0-9.-]+\.[A-Z|a-z]{2,})</span></code><span leaf="">：域名部分的捕获组。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\b</span></code><span leaf="">：单词边界，确保匹配整个电子邮件地址。</span></p></li></ul></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">50.匹配平衡括号</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">创建正则表达式匹配带平衡括号的表达式。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> regex</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">is_balanced</span></span><span style="line-height: 26px;"><span leaf="">(expression)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配带平衡括号的表达式的正则表达式模式</span></span><span leaf="">    pattern = regex.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;&#39;&#39;</span><span leaf="">        \(</span><span leaf="">            (?: [^()]+ | (?R) )*</span><span leaf="">        \)</span><span leaf="">    &#39;&#39;&#39;</span></span><span leaf="">, regex.VERBOSE)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">return</span></span><span leaf=""> bool(pattern.fullmatch(expression))</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">expressions = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;(a + b) * (c - d)&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;((x + y) * z)&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;((a + b) * (c - d)&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;a + b) * (c - d)&#34;</span></span><span leaf="">,</span><span leaf="">]</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> expr </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> expressions:</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> is_balanced(expr):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;表达式 &#39;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{expr}</span></span><span leaf="">&#39; 有平衡的括号。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;表达式 &#39;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{expr}</span></span><span leaf="">&#39; 没有平衡的括号。&#34;</span></span><span leaf="">)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\(</span></code><span leaf="">：匹配左括号。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?: [^()]+ | (?R) )*</span></code><span leaf="">：非捕获组，零次或多次出现以下内容：</span></p></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[^()]+</span></code><span leaf="">：除括号外的任何字符序列。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?R)</span></code><span leaf="">：递归匹配整个模式。</span></p></li></ul><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\)</span></code><span leaf="">：匹配右括号。</span></p></li></ul><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">Python 中的 </span><code style=""><span leaf="">regex</span></code><span leaf=""> 模块支持递归模式，允许定义引用自身的模式。在这种情况下，模式 </span><code style=""><span leaf="">(?R)</span></code><span leaf=""> 用于递归匹配整个模式。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">51.验证 IP 地址</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">设计正则表达式模式验证 IPv4 和 IPv6 地址。</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">validate_ipv4_address</span></span><span style="line-height: 26px;"><span leaf="">(ipv4)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># IPv4 地址验证的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span leaf="">        </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^&#39;</span></span><span leaf="">        </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.&#39;</span></span><span leaf="">        </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.&#39;</span></span><span leaf="">        </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.&#39;</span></span><span leaf="">        </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$&#39;</span></span><span leaf="">    )</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">return</span></span><span leaf=""> bool(pattern.match(ipv4))</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">ipv4_addresses = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;192.168.1.1&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;10.0.0.255&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;256.256.256.256&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid-ip&#34;</span></span><span leaf="">,</span><span leaf="">]</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> ipv4 </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> ipv4_addresses:</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> validate_ipv4_address(ipv4):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{ipv4}</span></span><span leaf=""> 是有效的 IPv4 地址。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{ipv4}</span></span><span leaf=""> 不是有效的 IPv4 地址。&#34;</span></span><span leaf="">)</span></code></pre><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">validate_ipv6_address</span></span><span style="line-height: 26px;"><span leaf="">(ipv6)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># IPv6 地址验证的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span leaf="">        </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^&#39;</span></span><span leaf="">        </span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$&#39;</span></span><span leaf="">    )</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">return</span></span><span leaf=""> bool(pattern.match(ipv6))</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">ipv6_addresses = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;2001:0db8:85a3:0000:0000:8a2e:0370:7334&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid-ipv6&#34;</span></span><span leaf="">,</span><span leaf="">]</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> ipv6 </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> ipv6_addresses:</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> validate_ipv6_address(ipv6):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{ipv6}</span></span><span leaf=""> 是有效的 IPv6 地址。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{ipv6}</span></span><span leaf=""> 不是有效的 IPv6 地址。&#34;</span></span><span leaf="">)</span></code></pre><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">IPv4 地址验证：</span></p><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">IPv6 地址验证：</span></p></div></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}</span></code><span leaf="">：验证 IPv6 地址块。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">:</span></code><span leaf="">：匹配冒号分隔符。</span></p></li></ul><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">^</span></code><span leaf="">：断言字符串的开头。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)</span></code><span leaf="">：验证每个八位字节。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\.</span></code><span leaf="">：匹配点分隔符。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">$</span></code><span leaf="">：断言字符串的结尾。</span></p></li></ul><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用该模式从文本中提取 IP 地址。</span></p><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: rgb(239, 112, 96);line-height: 1.8em;letter-spacing: 0em;background-attachment: scroll;background-clip: border-box;background-color: transparent;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;width: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);overflow-wrap: break-word;padding-right: 4px;padding-bottom: 2px;padding-left: 4px;border-top-left-radius: 4px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;border-bottom-left-radius: 4px;margin-top: 0px;margin-right: 2px;margin-bottom: 0px;margin-left: 2px;word-break: break-all;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_ip_addresses</span></span><span style="line-height: 26px;"><span leaf="">(text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># IPv4 地址提取的正则表达式模式</span></span><span leaf="">    ipv4_pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\b(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># IPv6 地址提取的正则表达式模式</span></span><span leaf="">    ipv6_pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\b(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}\b&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有匹配项</span></span><span leaf="">    ipv4_matches = ipv4_pattern.findall(text)</span><span leaf="">    ipv6_matches = ipv6_pattern.findall(text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印匹配的 IP 地址</span></span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;IPv4 地址：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> ipv4_match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> ipv4_matches:</span><span leaf="">        print(ipv4_match)</span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;\nIPv6 地址：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> ipv6_match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> ipv6_matches:</span><span leaf="">        print(ipv6_match)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_text = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">本文中的 IP 地址：</span><span leaf="">- IPv4：192.168.1.1、10.0.0.255、256.256.256.256</span><span leaf="">- IPv6：2001:0db8:85a3:0000:0000:8a2e:0370:7334</span><span leaf="">&#34;&#34;&#34;</span></span><span leaf="">extract_ip_addresses(sample_text)</span></code></pre></div></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">52.匹配 Markdown 链接</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">创建正则表达式模式匹配和提取 Markdown 文本中的链接。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_markdown_links</span></span><span style="line-height: 26px;"><span leaf="">(markdown_text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 提取行内链接的正则表达式模式</span></span><span leaf="">    inline_link_pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\[([^\]]+)\]\(([^)]+)\)&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 提取引用式链接的正则表达式模式</span></span><span leaf="">    reference_link_pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\[([^\]]+)\]:\s*([^\s]+)&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有行内链接</span></span><span leaf="">    inline_links = inline_link_pattern.findall(markdown_text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有引用式链接</span></span><span leaf="">    reference_links = reference_link_pattern.findall(markdown_text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印提取的链接</span></span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;行内链接：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> title, url </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> inline_links:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;标题：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{title}</span></span><span leaf="">，URL：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{url}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;\n引用式链接：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> title, url </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> reference_links:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;标题：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{title}</span></span><span leaf="">，URL：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{url}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_markdown = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">Here are some links in Markdown:</span><span leaf="">- [Google](<a href="https://www.google.com)" target="_blank">https://www.google.com)</a></span><span leaf="">- [OpenAI](<a href="https://www.openai.com)" target="_blank">https://www.openai.com)</a></span><span leaf="">Reference-style links:</span><span leaf="">[Markdown Guide]: <a href="https://www.markdownguide.org" target="_blank">https://www.markdownguide.org</a></span><span leaf="">[GitHub]: <a href="https://github.com" target="_blank">https://github.com</a></span><span leaf="">&#34;&#34;&#34;</span></span><span leaf="">extract_markdown_links(sample_markdown)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">inline_link_pattern</span></code><span leaf=""> 正则表达式捕获方括号（[]）内的文本作为链接标题，圆括号（()）内的文本作为链接 URL。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">reference_link_pattern</span></code><span leaf=""> 正则表达式捕获方括号（[]）内的文本作为链接标题，冒号（:）后的文本（含可选空格）作为链接 URL。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">53.匹配带引号的字符串</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">设计正则表达式模式匹配文本中的带引号字符串。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_quoted_strings</span></span><span style="line-height: 26px;"><span leaf="">(text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 提取单引号字符串的正则表达式模式</span></span><span leaf="">    single_quoted_pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#34;&#39;([^&#39;]+)&#39;&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 提取双引号字符串的正则表达式模式</span></span><span leaf="">    double_quoted_pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;&#34;([^&#34;]+)&#34;&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有单引号字符串</span></span><span leaf="">    single_quoted_strings = single_quoted_pattern.findall(text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有双引号字符串</span></span><span leaf="">    double_quoted_strings = double_quoted_pattern.findall(text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印提取的带引号字符串</span></span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;单引号字符串：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> single_quoted </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> single_quoted_strings:</span><span leaf="">        print(single_quoted)</span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;\n双引号字符串：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> double_quoted </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> double_quoted_strings:</span><span leaf="">        print(double_quoted)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_text = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">Here are some quoted strings in the text:</span><span leaf="">- Single-quoted: &#39;Hello, world!&#39;</span><span leaf="">- Double-quoted: &#34;This is a quoted string.&#34;</span><span leaf="">Mixed quotes: &#39;Single and &#34;double&#34; quotes.&#39;</span><span leaf="">&#34;&#34;&#34;</span></span><span leaf="">extract_quoted_strings(sample_text)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">single_quoted_pattern</span></code><span leaf=""> 正则表达式捕获单引号（&#39;）内的文本作为单引号字符串的内容。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">double_quoted_pattern</span></code><span leaf=""> 正则表达式捕获双引号（&#34;）内的文本作为双引号字符串的内容。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">54.提取 HTML 属性</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">构建模式从文本中提取 HTML 标签属性。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_html_attributes</span></span><span style="line-height: 26px;"><span leaf="">(html_text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 提取 HTML 标签属性的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;&lt;\s*([a-zA-Z0-9_-]+)(?:\s+([a-zA-Z0-9_-]+)\s*=\s*(&#34;.*?&#34;|\&#39;.*?\&#39;|[^\s&gt;]+))*\s*/?&gt;&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有 HTML 标签</span></span><span leaf="">    matches = pattern.finditer(html_text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 提取并打印标签名称和属性</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        tag_name = match.group(</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">1</span></span><span leaf="">)</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;标签：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{tag_name}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span leaf="">        </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> match.group(</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">2</span></span><span leaf="">):</span><span leaf="">            attributes = match.group(</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">2</span></span><span leaf="">)</span><span leaf="">            attribute_pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;([a-zA-Z0-9_-]+)\s*=\s*(&#34;.*?&#34;|\&#39;.*?\&#39;|[^\s&gt;]+)&#39;</span></span><span leaf="">)</span><span leaf="">            </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 提取并打印单个属性</span></span><span leaf="">            </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> attribute_match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> attribute_pattern.finditer(attributes):</span><span leaf="">                attribute_name = attribute_match.group(</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">1</span></span><span leaf="">)</span><span leaf="">                attribute_value = attribute_match.group(</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">2</span></span><span leaf="">)</span><span leaf="">                print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;  属性：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{attribute_name}</span></span><span leaf="">，值：</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{attribute_value}</span></span><span leaf="">&#34;</span></span><span leaf="">)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_html = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">&lt;div class=&#34;container&#34; id=&#39;main-container&#39; data-value=42&gt;</span><span leaf="">    &lt;p style=&#34;color: blue;&#34;&gt;This is a paragraph&lt;/p&gt;</span><span leaf="">    &lt;a href=&#34;<a href="https://example.com" target="_blank">https://example.com</a>&#34; target=&#34;_blank&#34;&gt;Visit Example&lt;/a&gt;</span><span leaf="">&lt;/div&gt;</span><span leaf="">&#34;&#34;&#34;</span></span><span leaf="">extract_html_attributes(sample_html)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">pattern</span></code><span leaf=""> 正则表达式捕获标签名称及其属性。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">attribute_pattern</span></code><span leaf=""> 正则表达式捕获单个属性及其值。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">55.组上的量词</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">将量词直接应用于组（例如，</span><code style=""><span leaf="">(ab)+</span></code><span leaf=""> 匹配一个或多个 &#39;ab&#39; 序列）。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">56.匹配十六进制颜色</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">设计模式匹配 HTML 中的十六进制颜色代码。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_hex_color_codes</span></span><span style="line-height: 26px;"><span leaf="">(html_text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配十六进制颜色代码的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})\b&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有颜色代码</span></span><span leaf="">    color_codes = pattern.findall(html_text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印匹配的颜色代码</span></span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;十六进制颜色代码：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> color_code </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> color_codes:</span><span leaf="">        print(color_code)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_html = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">&lt;style&gt;</span><span leaf="">    .background-color {</span><span leaf="">        background-color: #aabbcc;</span><span leaf="">    }</span><span leaf="">    .text-color {</span><span leaf="">        color: #123;</span><span leaf="">    }</span><span leaf="">&lt;/style&gt;</span><span leaf="">&#34;&#34;&#34;</span></span><span leaf="">extract_hex_color_codes(sample_html)</span></code></pre><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf="">pattern</span></code><span leaf=""> 正则表达式匹配短格式（</span><code style=""><span leaf="">#abc</span></code><span leaf="">）或长格式（</span><code style=""><span leaf="">#aabbcc</span></code><span leaf="">）的十六进制颜色代码。</span></p><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})</span></code><span leaf="">：</span></p></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?: ... )</span></code><span leaf="">：非捕获组。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[0-9a-fA-F]{3}</span></code><span leaf="">：匹配三位十六进制数字。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">|</span></code><span leaf="">：选择。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[0-9a-fA-F]{6}</span></code><span leaf="">：匹配六位十六进制数字。</span></p></li></ul></ul><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">此模式将在给定的 HTML 文本中找到所有十六进制颜色代码。请注意，此正则表达式可能还会匹配其他类似十六进制颜色代码的模式。为了更精确地提取，你可以考虑使用专门的 HTML 解析库（如 BeautifulSoup），然后从 style 属性或内联样式中提取颜色代码。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">57.验证信用卡有效期</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">创建正则表达式模式验证信用卡有效期。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">from</span></span><span leaf=""> datetime </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> datetime</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">validate_credit_card_expiry</span></span><span style="line-height: 26px;"><span leaf="">(expiry_date)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 验证 MM/YY 或 MM/YYYY 格式的信用卡有效期的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^(0[1-9]|1[0-2])/(20\d{2}|[3-9]\d)$&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 检查日期是否匹配模式</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span style="color: #c678dd;line-height: 26px;"><span leaf="">not</span></span><span leaf=""> pattern.match(expiry_date):</span><span leaf="">        </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">return</span></span><span style="color: #56b6c2;line-height: 26px;"><span leaf="">False</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 从日期中提取月份和年份</span></span><span leaf="">    month, year = map(int, expiry_date.split(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;/&#39;</span></span><span leaf="">))</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 处理年份（如果是两位数）</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> year &lt; </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">100</span></span><span leaf="">:</span><span leaf="">        year += </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">2000</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 检查日期是否在未来</span></span><span leaf="">    current_date = datetime.now()</span><span leaf="">    expiry_date = datetime(year, month, </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">1</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">return</span></span><span leaf=""> expiry_date &gt; current_date</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">expiry_dates = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;12/23&#34;</span></span><span leaf="">,  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 有效</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;06/2024&#34;</span></span><span leaf="">,  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 有效</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;13/25&#34;</span></span><span leaf="">,  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效（月份超过12）</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;01/2000&#34;</span></span><span leaf="">,  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效（已过期）</span></span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;MM/YY&#34;</span></span><span leaf="">,  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 无效（格式无效）</span></span><span leaf="">]</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> expiry_date </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> expiry_dates:</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> validate_credit_card_expiry(expiry_date):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{expiry_date}</span></span><span leaf=""> 是有效的信用卡有效期。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{expiry_date}</span></span><span leaf=""> 不是有效的信用卡有效期。&#34;</span></span><span leaf="">)</span></code></pre><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf="">pattern</span></code><span leaf=""> 正则表达式验证 MM/YY 或 MM/YYYY 格式的日期。</span></p><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">^(0[1-9]|1[0-2])</span></code><span leaf="">：匹配 MM 格式的月份（01 到 12）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">/</span></code><span leaf="">：匹配分隔符。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(20\d{2}|[3-9]\d)$</span></code><span leaf="">：匹配 YYYY 格式（以 20 开头）或 YY 格式（以 3-9 开头）的年份。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">Python 代码随后检查日期是否在未来。</span></p></li></ul><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">请注意，虽然正则表达式可以执行基本验证，但必须基于实际日期执行额外检查以确保准确性。对于更可靠的日期处理，考虑使用 </span><code style=""><span leaf="">dateutil.parser</span></code><span leaf=""> 等日期解析库。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">58.匹配函数调用</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">设计正则表达式模式匹配代码中的函数调用。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_function_calls</span></span><span style="line-height: 26px;"><span leaf="">(code_text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配函数调用的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\b([a-zA-Z_]\w*)\s*\([^)]*\)&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有函数调用</span></span><span leaf="">    matches = pattern.findall(code_text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印匹配的函数调用</span></span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;函数调用：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        print(match)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_code = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">def hello_world():</span><span leaf="">    print(&#34;Hello, World!&#34;)</span><span leaf="">result = add_numbers(5, 7) + multiply(3, 4)</span><span leaf="">&#34;&#34;&#34;</span></span><span leaf="">extract_function_calls(sample_code)</span></code></pre><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf="">pattern</span></code><span leaf=""> 正则表达式捕获函数调用，包含以下组件：</span></p><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\b</span></code><span leaf="">：单词边界，确保匹配完整的函数名。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">([a-zA-Z_]\w*)</span></code><span leaf="">：捕获函数名（以字母或下划线开头，后跟字母、数字或下划线）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\s*</span></code><span leaf="">：匹配可选空格。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\(</span></code><span leaf="">：匹配函数调用的左括号。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[^)]*</span></code><span leaf="">：匹配除右括号外的任何字符，允许包含参数。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\)</span></code><span leaf="">：匹配函数调用的右括号。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">59.匹配 SQL 查询</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">创建模式匹配文本中的 SQL 查询。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_sql_queries</span></span><span style="line-height: 26px;"><span leaf="">(text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配 SQL 查询的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\b(SELECT|INSERT|UPDATE|DELETE|CREATE|ALTER|DROP|FROM|JOIN|WHERE|ORDER BY|GROUP BY|HAVING|LIMIT|AND|OR|IN|SET|VALUES|INTO|AS|ON|INNER|LEFT|RIGHT|OUTER)\b&#39;</span></span><span leaf="">, re.IGNORECASE)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有 SQL 关键字</span></span><span leaf="">    matches = pattern.findall(text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印匹配的 SQL 查询</span></span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;SQL 关键字：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        print(match)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_text = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">SELECT * FROM employees WHERE department = &#39;IT&#39;;</span><span leaf="">INSERT INTO customers (name, email) VALUES (&#39;John Doe&#39;, &#39;john@example.com&#39;);</span><span leaf="">UPDATE products SET price = 29.99 WHERE category = &#39;Electronics&#39;;</span><span leaf="">&#34;&#34;&#34;</span></span><span leaf="">extract_sql_queries(sample_text)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">pattern</span></code><span leaf=""> 正则表达式捕获常见的 SQL 关键字，如 SELECT、INSERT、UPDATE、DELETE 等。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\b</span></code><span leaf="">：单词边界，确保匹配完整的关键字。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">re.IGNORECASE</span></code><span leaf="">：标志用于使模式不区分大小写。</span></p></li></ul><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">这是一个基本示例，可能无法覆盖所有 SQL 变体。对于更复杂的场景（如处理嵌套查询或注释），可能需要更复杂的解析器。对于更准确的 SQL 解析，考虑使用专门的 SQL 解析库或工具。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">60.匹配 XML 标签</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">设计模式匹配并提取 XML 标签之间的内容。</span></p></li></ol><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_xml_content</span></span><span style="line-height: 26px;"><span leaf="">(xml_text, tag_name)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配并提取 XML 标签之间内容的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">rf&#39;&lt;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{tag_name}</span></span><span leaf="">[^&gt;]*&gt;(.*?)&lt;\/</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{tag_name}</span></span><span leaf="">&gt;&#39;</span></span><span leaf="">, re.DOTALL)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有匹配项</span></span><span leaf="">    matches = pattern.findall(xml_text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印提取的内容</span></span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;&lt;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{tag_name}</span></span><span leaf="">&gt; 标签之间的内容：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        print(match.strip())</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_xml = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">&lt;book&gt;</span><span leaf="">    &lt;title&gt;Introduction to XML&lt;/title&gt;</span><span leaf="">    &lt;author&gt;John Doe&lt;/author&gt;</span><span leaf="">    &lt;content&gt;</span><span leaf="">        This is a sample book about XML.</span><span leaf="">    &lt;/content&gt;</span><span leaf="">&lt;/book&gt;</span><span leaf="">&#34;&#34;&#34;</span></span><span leaf="">extract_xml_content(sample_xml, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;title&#39;</span></span><span leaf="">)</span><span leaf="">extract_xml_content(sample_xml, </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#39;content&#39;</span></span><span leaf="">)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">该模式用于捕获指定 XML 标签之间的内容。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">rf&#39;&lt;{tag_name}[^&gt;]*&gt;(.*?)&lt;\/{tag_name}&gt;&#39;</span></code><span leaf="">：通过 f 字符串动态插入标签名，匹配开始标签 </span><code style=""><span leaf="">&lt;tag_name&gt;</span></code><span leaf=""> 与对应结束标签 </span><code style=""><span leaf="">&lt;/tag_name&gt;</span></code><span leaf=""> 之间的内容。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">re.DOTALL</span></code><span leaf=""> 标志使正则表达式中的 </span><code style=""><span leaf="">.</span></code><span leaf=""> 能匹配包括换行符在内的所有字符。</span></p></li></ul><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">需注意，此示例适用于无嵌套标签的简单场景。对于复杂 XML 解析，建议使用 ElementTree 或 lxml 等专用 XML 解析库，它们能更精准地处理 XML 结构。</span></p><ol style="list-style-type: decimal;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">若 XML 的开始标签包含属性，可调整模式以适配，例如用 </span><code style=""><span leaf="">(\w+)\s*=\s*[&#34;&#39;]([^&#34;&#39;]*)[&#34;&#39;]</span></code><span leaf=""> 捕获属性名和属性值。</span></p></div></li><li><div style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><p style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">若 XML 包含命名空间前缀，可使用适配模式（如 </span><code style=""><span leaf="">(\w+:)?(\w+)</span></code><span leaf="">）同时捕获命名空间前缀和本地名称。</span></p></div></li></ol><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">61.匹配句子</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">创建模式匹配文本中的完整句子。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_sentences</span></span><span style="line-height: 26px;"><span leaf="">(text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配英文完整句子的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(?&lt;!\w\.\w.)(?&lt;![A-Z][a-z]\.)(?&lt;=\.|\?)\s&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 按模式将文本拆分为句子</span></span><span leaf="">    sentences = re.split(pattern, text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印提取的句子</span></span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;提取的句子：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> sentence </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> sentences:</span><span leaf="">        print(sentence.strip())</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_text = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">This is the first sentence. It contains multiple words.</span><span leaf="">The second sentence has more words. It also ends with a period.</span><span leaf="">A third sentence exists as well, with a question mark at the end?</span><span leaf="">&#34;&#34;&#34;</span></span><span leaf="">extract_sentences(sample_text)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">该模式通过正向后顾检测句子结尾的标点（</span><code style=""><span leaf="">.</span></code><span leaf=""> 或 </span><code style=""><span leaf="">?</span></code><span leaf="">）及后续空白。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?&lt;!\w\.\w.)</span></code><span leaf="">：负向后顾，排除 &#34;Mr.&#34; 等缩写。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?&lt;![A-Z][a-z]\.)</span></code><span leaf="">：负向后顾，排除句尾常见缩写。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?&lt;=\.|\?)</span></code><span leaf="">：正向后顾，匹配句号或问号后跟空白的情况。</span></p></li></ul><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">需注意，此示例无法覆盖所有复杂文本场景。对于高级句子提取，建议使用 spaCy 或 NLTK 等自然语言处理库，它们专为处理语言结构设计。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">62.提取 HTML 注释</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">设计模式提取 HTML 注释内的内容。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_html_comments</span></span><span style="line-height: 26px;"><span leaf="">(html_text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配并提取 HTML 注释内内容的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;&lt;!--(.*?)--&gt;&#39;</span></span><span leaf="">, re.DOTALL)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有匹配项</span></span><span leaf="">    matches = pattern.findall(html_text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印提取的内容</span></span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;HTML 注释内的内容：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        print(match.strip())</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_html = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt;</span><span leaf="">    &lt;title&gt;HTML Comments Example&lt;/title&gt;&lt;/head&gt;&lt;body&gt;</span><span leaf="">    &lt;!-- This is a comment --&gt;</span><span leaf="">    &lt;p&gt;This is a paragraph.&lt;/p&gt;</span><span leaf="">    &lt;!-- Another comment</span><span leaf="">    spanning multiple lines --&gt;</span><span leaf="">    &lt;div&gt;</span><span leaf="">        &lt;p&gt;More content&lt;/p&gt;</span><span leaf="">    &lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</span><span leaf="">&#34;&#34;&#34;</span></span><span leaf="">extract_html_comments(sample_html)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">pattern</span></code><span leaf=""> 正则表达式使用非贪婪匹配 </span><code style=""><span leaf="">(.*?)</span></code><span leaf=""> 捕获 </span><code style=""><span leaf="">&lt;!--</span></code><span leaf=""> 和 </span><code style=""><span leaf="">--&gt;</span></code><span leaf=""> 之间的内容。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">re.DOTALL</span></code><span leaf="">：标志使正则表达式中的点（.）匹配包括换行符在内的所有字符。</span></p></li></ul><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">需要注意的是，虽然此示例在简单场景下可行，但使用正则表达式解析 HTML 注释可能无法覆盖所有边缘情况。对于更可靠的 HTML 解析，建议使用 Python 中的 BeautifulSoup 或 lxml 等专用 HTML 解析库，这些库专为处理 HTML 结构的复杂性而设计，能提供更可靠的 HTML 文档解析方案。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">63.匹配浮点数</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">创建正则表达式模式匹配浮点数。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_float_numbers</span></span><span style="line-height: 26px;"><span leaf="">(text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配浮点数的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;-?\b(?:\d+\.\d*|\.\d+|\d+)(?:[eE][-+]?\d+)?\b&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有匹配项</span></span><span leaf="">    matches = pattern.findall(text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印提取的浮点数</span></span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;提取的浮点数：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        print(match)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_text = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">文本中的数字：3.14、-0.5、123.456、.789、1.2e3、-4.56E-7</span><span leaf="">非数字：abc、1.2.3、1e、1E2.5</span><span leaf="">&#34;&#34;&#34;</span></span><span leaf="">extract_float_numbers(sample_text)</span></code></pre><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf="">pattern</span></code><span leaf=""> 正则表达式捕获多种格式的浮点数，各部分含义如下：</span></p><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">-?</span></code><span leaf="">：可选的负号，用于匹配负数。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\b</span></code><span leaf="">：单词边界，确保匹配完整的数字。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?:\d+\.\d*|\.\d+|\d+)</span></code><span leaf="">：用于匹配三种情况的分组：</span></p></li><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\d+\.\d*</span></code><span leaf="">：带整数部分且小数部分可选的十进制数。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\.\d+</span></code><span leaf="">：以小数点开头的十进制数。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\d+</span></code><span leaf="">：无小数点的整数部分。</span></p></li></ul><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?:[eE][-+]?\d+)?</span></code><span leaf="">：可选的指数部分，形式为 e 或 E 后跟可选符号及数字。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">64.验证 MAC 地址</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">设计正则表达式模式验证 MAC 地址。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">validate_mac_address</span></span><span style="line-height: 26px;"><span leaf="">(mac_address)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 验证 MAC 地址的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 检查 MAC 地址是否匹配模式</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">return</span></span><span leaf=""> bool(pattern.match(mac_address))</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">mac_addresses = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;00:1a:2b:3c:4d:5e&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;01-23-45-67-89-ab&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;a1:b2:c3:d4:e5:f6&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid_mac&#34;</span></span><span leaf="">,</span><span leaf="">]</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> mac_address </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> mac_addresses:</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> validate_mac_address(mac_address):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{mac_address}</span></span><span leaf=""> 是有效的 MAC 地址。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{mac_address}</span></span><span leaf=""> 不是有效的 MAC 地址。&#34;</span></span><span leaf="">)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">pattern</span></code><span leaf=""> 正则表达式验证格式为 </span><code style=""><span leaf="">XX:XX:XX:XX:XX:XX</span></code><span leaf=""> 或 </span><code style=""><span leaf="">XX-XX-XX-XX-XX-XX</span></code><span leaf=""> 的 MAC 地址，其中 X 为十六进制数字（0-9、A-F、a-f）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">^</span></code><span leaf="">：匹配字符串的开头。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">([0-9A-Fa-f]{2}[:-]){5}</span></code><span leaf="">：匹配五组两位十六进制数字后跟冒号或连字符的组合。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">([0-9A-Fa-f]{2})</span></code><span leaf="">：匹配最后一组两位十六进制数字。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">$</span></code><span leaf="">：匹配字符串的结尾。</span></p></li></ul><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">此模式确保 MAC 地址由六组两位十六进制数字组成，各组之间用冒号或连字符分隔。可根据特定的 MAC 地址要求或格式变体进行调整。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">65.验证 URL</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用正则表达式模式验证带可选协议的 URL。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">validate_url</span></span><span style="line-height: 26px;"><span leaf="">(url)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 验证带可选协议的 URL 的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^(?:(?:https?|ftp):\/\/)?[^\s\/$.?#].[^\s]*$&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 检查 URL 是否匹配模式</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">return</span></span><span leaf=""> bool(pattern.match(url))</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">urls = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;<a href="http://www.example.com" target="_blank">http://www.example.com</a>&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;<a href="https://example.com/path/to/page" target="_blank">https://example.com/path/to/page</a>&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;ftp://ftp.example.net&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;www.example.org&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;invalid url&#34;</span></span><span leaf="">,</span><span leaf="">]</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> url </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> urls:</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> validate_url(url):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{url}</span></span><span leaf=""> 是有效的 URL。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{url}</span></span><span leaf=""> 不是有效的 URL。&#34;</span></span><span leaf="">)</span></code></pre><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><code style=""><span leaf="">pattern</span></code><span leaf=""> 正则表达式验证带可选协议的 URL，各部分含义如下：</span></p><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">^(?:(?:https?|ftp):\/\/)?</span></code><span leaf="">：可选的非捕获组，用于匹配协议（http、https 或 ftp）及后跟的 &#34;://&#34;。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[^\s\/$.?#].[^\s]*$</span></code><span leaf="">：匹配 URL 的其余部分，排除空白字符和某些特殊字符。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">66.匹配社会安全号码</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">设计模式匹配并提取社会安全号码。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_social_security_numbers</span></span><span style="line-height: 26px;"><span leaf="">(text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配并提取社会安全号码的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\b(\d{3}-\d{2}-\d{4})\b&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有匹配项</span></span><span leaf="">    matches = pattern.findall(text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印提取的社会安全号码</span></span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;提取的社会安全号码：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        print(match)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_text = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">文本中的社会安全号码：123-45-6789、987-65-4321</span><span leaf="">非社会安全号码：123-456-789、123-45-67890</span><span leaf="">&#34;&#34;&#34;</span></span><span leaf="">extract_social_security_numbers(sample_text)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">pattern</span></code><span leaf=""> 正则表达式捕获格式为 </span><code style=""><span leaf="">XXX-XX-XXXX</span></code><span leaf=""> 的社会安全号码，其中 X 为数字。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\b</span></code><span leaf="">：单词边界，确保匹配完整的社会安全号码。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">67.提取哈希标签</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">创建模式从文本中提取哈希标签。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_hashtags</span></span><span style="line-height: 26px;"><span leaf="">(text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配并提取哈希标签的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\#\w+&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有匹配项</span></span><span leaf="">    matches = pattern.findall(text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印提取的哈希标签</span></span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;提取的哈希标签：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        print(match)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_text = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">这是一条带 #sample 文本和 #hashtags 的内容。</span><span leaf="">#DataScience 和 #MachineLearning 是有趣的话题。</span><span leaf="">这里没有哈希标签。</span><span leaf="">&#34;&#34;&#34;</span></span><span leaf="">extract_hashtags(sample_text)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">pattern</span></code><span leaf=""> 正则表达式捕获以 &#39;#&#39; 符号开头，后跟一个或多个单词字符（\w+）的哈希标签。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\#</span></code><span leaf="">：匹配 &#39;#&#39; 符号。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\w+</span></code><span leaf="">：匹配一个或多个单词字符（字母、数字或下划线）。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">68.匹配 Python 文档字符串</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">创建模式匹配代码中的 Python 文档字符串。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_python_docstrings</span></span><span style="line-height: 26px;"><span leaf="">(code)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配 Python 文档字符串的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;(\&#39;\&#39;\&#39;|\&#34;\&#34;\&#34;.*?\&#39;\&#39;\&#39;|\&#34;\&#34;\&#34;.*?\&#34;\&#34;\&#34;)&#39;</span></span><span leaf="">, re.DOTALL)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在代码中查找所有匹配项</span></span><span leaf="">    matches = pattern.findall(code)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印提取的 Python 文档字符串</span></span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;提取的 Python 文档字符串：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        print(match)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_code = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">def example_function():</span><span leaf="">    &#39;&#39;&#39;</span><span leaf="">    这是示例函数的文档字符串。</span><span leaf="">    它可以跨多行。</span><span leaf="">    &#39;&#39;&#39;</span><span leaf="">    pass</span><span leaf="">class ExampleClass:</span><span leaf="">    \&#34;\&#34;\&#34;</span><span leaf="">    ExampleClass 的文档字符串。</span><span leaf="">    它提供了关于该类的信息。</span><span leaf="">    \&#34;\&#34;\&#34;</span><span leaf="">    def __init__(self):</span><span leaf="">        pass</span><span leaf="">&#34;&#34;&#34;</span></span><span leaf="">extract_python_docstrings(sample_code)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">pattern</span></code><span leaf=""> 正则表达式捕获用三重单引号或三重双引号（&#39;&#39;&#39; 或 &#34;&#34;&#34;）括起来的文档字符串。</span><code style=""><span leaf="">re.DOTALL</span></code><span leaf=""> 标志用于使正则表达式中的点（.）匹配包括换行符在内的所有字符。</span></p></li></ul><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">此正则表达式模式提供了一种捕获 Python 文档字符串的基本方法，但需要注意的是，Python 文档字符串的格式多样（例如，可能带或不带三重引号、使用单引号或双引号等）。对于更可靠的解决方案，可考虑使用 </span><code style=""><span leaf="">ast</span></code><span leaf=""> 等专用的 Python 解析器或库从代码中提取文档字符串。</span></p><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">69.匹配 Markdown 标题</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">设计正则表达式模式匹配 Markdown 标题。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_markdown_headings</span></span><span style="line-height: 26px;"><span leaf="">(markdown_text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配不同级别 Markdown 标题的正则表达式模式</span></span><span leaf="">    heading_patterns = [</span><span leaf="">        re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^#\s(.+)$&#39;</span></span><span leaf="">, re.MULTILINE),      </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 一级标题</span></span><span leaf="">        re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^##\s(.+)$&#39;</span></span><span leaf="">, re.MULTILINE),     </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 二级标题</span></span><span leaf="">        re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^###\s(.+)$&#39;</span></span><span leaf="">, re.MULTILINE),    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 三级标题</span></span><span leaf="">        re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^####\s(.+)$&#39;</span></span><span leaf="">, re.MULTILINE),   </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 四级标题</span></span><span leaf="">        re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^#####\s(.+)$&#39;</span></span><span leaf="">, re.MULTILINE),  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 五级标题</span></span><span leaf="">        re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^######\s(.+)$&#39;</span></span><span leaf="">, re.MULTILINE)  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 六级标题</span></span><span leaf="">    ]</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找每个级别标题的所有匹配项</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> i, pattern </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> enumerate(heading_patterns, start=</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">1</span></span><span leaf="">):</span><span leaf="">        matches = pattern.findall(markdown_text)</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;提取的 </span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{i}</span></span><span leaf=""> 级标题：&#34;</span></span><span leaf="">)</span><span leaf="">        </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">            print(match)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_markdown = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf=""># 一级标题</span><span leaf="">## 二级标题</span><span leaf="">### 三级标题</span><span leaf="">#### 四级标题</span><span leaf="">##### 五级标题</span><span leaf="">###### 六级标题</span><span leaf="">非标题：</span><span leaf="">- 项目符号</span><span leaf="">&#34;&#34;&#34;</span></span><span leaf="">extract_markdown_headings(sample_markdown)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><span leaf="">这些正则表达式模式使用 </span><code style=""><span leaf="">^</span></code><span leaf=""> 匹配行的开头，通过相应数量的 </span><code style=""><span leaf="">#</span></code><span leaf=""> 符号加空格来识别不同级别的标题。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(.+)$</span></code><span leaf=""> 捕获标题的内容。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">70.验证十六进制颜色代码</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">使用正则表达式模式验证十六进制颜色代码。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">validate_hex_color_code</span></span><span style="line-height: 26px;"><span leaf="">(color_code)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 验证十六进制颜色代码的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 检查颜色代码是否匹配模式</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">return</span></span><span leaf=""> bool(pattern.match(color_code))</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">color_codes = [</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;#123456&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;#abc&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;#fff&#34;</span></span><span leaf="">,</span><span leaf="">    </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;#invalid&#34;</span></span><span leaf="">,</span><span leaf="">]</span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> color_code </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> color_codes:</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">if</span></span><span leaf=""> validate_hex_color_code(color_code):</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{color_code}</span></span><span leaf=""> 是有效的十六进制颜色代码。&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">else</span></span><span leaf="">:</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;</span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{color_code}</span></span><span leaf=""> 不是有效的十六进制颜色代码。&#34;</span></span><span leaf="">)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">pattern</span></code><span leaf=""> 正则表达式验证形式为 </span><code style=""><span leaf="">#RRGGBB</span></code><span leaf=""> 或 </span><code style=""><span leaf="">#RGB</span></code><span leaf=""> 的十六进制颜色代码，其中 R、G、B 为十六进制数字。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">^#</span></code><span leaf="">：匹配字符串的开头和 &#39;#&#39; 符号。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})</span></code><span leaf="">：匹配六位或三位十六进制数字。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">$</span></code><span leaf="">：匹配字符串的结尾。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">71.匹配时间格式</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">创建模式匹配 HH:MM:SS、HH:MM 格式的时间以及带 AM/PM 的变体形式。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_times</span></span><span style="line-height: 26px;"><span leaf="">(text)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配不同格式时间的正则表达式模式</span></span><span leaf="">    time_patterns = [</span><span leaf="">        re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\b([01]?[0-9]|2[0-3]):([0-5][0-9])(?::([0-5][0-9]))?\b&#39;</span></span><span leaf="">),  </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># HH:MM:SS 或 HH:MM</span></span><span leaf="">        re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">r&#39;\b([01]?[0-9]|2[0-3]):([0-5][0-9])\s*([AaPp][Mm])?\b&#39;</span></span><span leaf="">)      </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># HH:MM AM/PM</span></span><span leaf="">    ]</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找每种时间模式的所有匹配项</span></span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> i, pattern </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> enumerate(time_patterns, start=</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">1</span></span><span leaf="">):</span><span leaf="">        matches = pattern.findall(text)</span><span leaf="">        print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">f&#34;提取的时间（格式 </span><span style="color: #e06c75;line-height: 26px;"><span leaf="">{i}</span></span><span leaf="">）：&#34;</span></span><span leaf="">)</span><span leaf="">        </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">            print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;:&#34;</span></span><span leaf="">.join(filter(</span><span style="color: #56b6c2;line-height: 26px;"><span leaf="">None</span></span><span leaf="">, match)))</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_text = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">文本中的时间：12:34、23:45:56、9:15 AM、6:30 PM、18:45</span><span leaf="">非时间：25:67、3:72、10:00 XYZ</span><span leaf="">&#34;&#34;&#34;</span></span><span leaf="">extract_times(sample_text)</span></code></pre><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">第一种模式匹配 HH:MM:SS 或 HH:MM 格式的时间：</span></p><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\b</span></code><span leaf="">：单词边界，确保匹配完整的时间。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">([01]?[0-9]|2[0-3])</span></code><span leaf="">：匹配小时（00 到 23）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">([0-5][0-9])</span></code><span leaf="">：匹配分钟（00 到 59）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?::([0-5][0-9]))?</span></code><span leaf="">：可选地匹配以 :SS 形式表示的秒。</span></p></li></ul><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">第二种模式匹配 HH:MM AM/PM 格式的时间：</span></p><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">([01]?[0-9]|2[0-3])</span></code><span leaf="">：匹配小时（00 到 23）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">([0-5][0-9])</span></code><span leaf="">：匹配分钟（00 到 59）。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\s*([AaPp][Mm])?</span></code><span leaf="">：可选地匹配 AM 或 PM。</span></p></li></ul><h2 data-tool="mdnice编辑器" style="border-bottom-color: rgb(239, 112, 96);margin-top: 30px;margin-bottom: 15px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 2px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.1em;overflow-x: unset;overflow-y: unset;text-align: left;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span style="display: none;"></span><span style="font-size: 22px;color: rgb(255, 255, 255);background-color: rgb(239, 112, 96);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 1px;border-bottom-width: 1px;border-left-width: 1px;border-right-width: 1px;border-top-color: rgb(0, 0, 0);border-bottom-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: rgb(0, 0, 0);border-top-left-radius: 3px;border-top-right-radius: 3px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 5px;overflow-x: unset;overflow-y: unset;padding-top: 3px;padding-bottom: 1px;padding-left: 10px;padding-right: 10px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"><span leaf="">72.匹配嵌套括号</span></span><span style="display: none;"></span><span style="border-bottom-color: rgb(239, 235, 233);align-items: unset;background-attachment: scroll;background-clip: border-box;background-color: unset;background-image: none;background-origin: padding-box;background-position-x: 0%;background-position-y: 0%;background-repeat: no-repeat;background-size: auto;border-top-style: none;border-bottom-style: solid;border-left-style: none;border-right-style: solid;border-top-width: 1px;border-bottom-width: 36px;border-left-width: 1px;border-right-width: 20px;border-top-color: rgb(0, 0, 0);border-left-color: rgb(0, 0, 0);border-right-color: transparent;border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-left-radius: 0px;border-bottom-right-radius: 0px;box-shadow: none;color: rgb(0, 0, 0);display: inline-block;font-size: 16px;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;letter-spacing: 0px;line-height: 1.1em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;overflow-x: unset;overflow-y: unset;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;text-align: left;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset;"></span></h2><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">设计模式匹配带指定深度嵌套括号的表达式。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/LTpwfH82ricnOghHT3tuGUUA46t3j40nGY15B2ib4XPmHial4GMbaxpqeTv4LSkTsWfWAmUj3vjahaS79ROV7ib2IwxSyTwMGH5X/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> re</span><span style="line-height: 26px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">def</span></span><span leaf=""> </span><span style="color: #61aeee;line-height: 26px;"><span leaf="">extract_nested_brackets</span></span><span style="line-height: 26px;"><span leaf="">(text, depth)</span></span><span leaf="">:</span></span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 匹配带指定深度嵌套括号的表达式的正则表达式模式</span></span><span leaf="">    pattern = re.compile(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">rf&#39;\((?:[^()]*|\((?:[^()]*|\((?:[^()]*|\((?:[^()]*|\([^()]*\))*\))*\))*\)){{</span><span leaf="">{depth}</span><span leaf="">}}\)&#39;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 在文本中查找所有匹配项</span></span><span leaf="">    matches = pattern.findall(text)</span><span leaf="">    </span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 打印提取的带嵌套括号的表达式</span></span><span leaf="">    print(</span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;提取的带嵌套括号的表达式：&#34;</span></span><span leaf="">)</span><span leaf="">    </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">for</span></span><span leaf=""> match </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">in</span></span><span leaf=""> matches:</span><span leaf="">        print(match)</span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 测试用例</span></span><span leaf="">sample_text = </span><span style="color: #98c379;line-height: 26px;"><span leaf="">&#34;&#34;&#34;</span><span leaf="">带嵌套括号的表达式：(a + (b * c) - d)</span><span leaf="">另一个表达式：((x + y) / z) * (m - n)</span><span leaf="">过深的表达式：(((p + q) - r) * s) / t</span><span leaf="">&#34;&#34;&#34;</span></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># 指定要匹配的嵌套括号深度</span></span><span leaf="">nested_depth = </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">2</span></span><span leaf="">extract_nested_brackets(sample_text, nested_depth)</span></code></pre><ul style="list-style-type: disc;margin-top: 8px;margin-bottom: 8px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 25px;padding-right: 0px;color: rgb(0, 0, 0);" class="list-paddingleft-1"><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">pattern</span></code><span leaf=""> 正则表达式尝试匹配嵌套括号深度不超过指定值的表达式。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\( ... \)</span></code><span leaf="">：匹配一对括号。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">(?: ... )</span></code><span leaf="">：用于分组但不捕获的非捕获组。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">[^()]*</span></code><span leaf="">：匹配零个或多个除 &#39;(&#39; 和 &#39;)&#39; 之外的字符。</span></p></li><li><p style="margin-top: 5px;margin-bottom: 5px;color: rgb(1, 1, 1);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;font-weight: normal;"><code style=""><span leaf="">\((?:[^()]*|\((?:[^()]*|\((?:[^()]*|\((?:[^()]*|\([^()]*\))*\))*\))*\))</span></code><span leaf="">：匹配嵌套深度不超过指定值的括号。</span></p></li></ul><p data-tool="mdnice编辑器" style="color: rgb(0, 0, 0);font-size: 16px;line-height: 1.8em;letter-spacing: 0em;text-align: left;text-indent: 0em;margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;"><span leaf="">需要注意的是，正则表达式并非解析括号等嵌套结构的最佳工具，尤其是当深度不固定时。对于更复杂的场景，可能需要使用解析器或更高级的方法。</span></p><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p></div><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247526291">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=1d12ac9a&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526291%26idx%3D2%26sn%3D0848f2546a224d61d886fc5b2d76f785">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 14 Aug 2025 17:38:00 +0800</pubDate>
    </item>
    <item>
      <title>北航副教授“手搓”电影《浪浪山小妖怪》，票房突破6亿元</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526291&amp;idx=3&amp;sn=564cdf4bf6186a08aeb532625f3a848e</link>
      <description>关注“书圈”：如果知识是通向未来的大门，我们愿意为你打造一把打开这扇门的钥匙！</description>
      <content:encoded><![CDATA[<p>
<span></span> <span>2025-08-14 17:38</span> <span style="display: inline-block;">浙江</span>
</p>

<p>关注“书圈”：如果知识是通向未来的大门，我们愿意为你打造一把打开这扇门的钥匙！</p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=ee2875df&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2F87HjJEl4c1u7GAxMiaAibrox6eWnFguhhxLMUasZEm7G3H3hzuBqRGhDzHRicsIIy92qDUXiaYTEgWjcvHKoRZMb5Q%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;visibility: visible;margin-bottom: 24px;"><p style="text-align: center;visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">8月2日</span></span></p><div style="visibility: visible;margin-bottom: 0px;"><p style="text-align: center;visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">电影</span></span><strong style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">《浪浪山小妖怪》</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">登陆全国院线</span></span></p><p style="text-align: center;visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">截至8月11日</span></span></p><p style="text-align: center;visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">累计票房突破6亿元</span></span></p><p style="text-align: center;visibility: visible;margin-bottom: 0px;"><strong style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">刷新中国影史国产二维动画电影</span></span></strong></p><p style="text-align: center;visibility: visible;margin-bottom: 0px;"><strong style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">票房纪录</span></span></strong></p></div></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;visibility: visible;margin-bottom: 24px;"><div style="visibility: visible;margin-bottom: 0px;"><p style="text-align: center;visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">小妖怪们的故事，在这个夏天</span></span></p><p style="text-align: center;visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">击中无数观众的内心</span></span></p></div></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;visibility: visible;margin-bottom: 24px;"><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;visibility: visible;margin-bottom: 0px;"><img style="vertical-align: middle;max-width: 100%;box-sizing: border-box;margin-bottom: 0px;width: 677px !important;height: auto;visibility: visible !important;" alt="图片" class="rich_pages wxw-img" data-ratio="1.5971014492753624" data-s="300,640" data-w="690" src="https://wechat2rss.xlab.app/img-proxy/?k=faaf5f30&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FOicCOBfngjylC3gUPqtVLtFOD0ibFiaiaLY2DkicBVL4lgcooRCQ9PFa5hHFBzib7ib2cKPZVaXZQdnJM4XnZF8icVlGYQ%2F640%3Fwx_fmt%3Djpeg%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwxpic"/></p></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><div style="margin-bottom: 0px;"><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">有细心的观众发现</span></span></p><div data-mpa-action-id="me8pvfj39pq" style="margin-bottom: 0px;"><div style="margin-bottom: 0px;"><div style="margin-bottom: 0px;"><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">影片的片尾</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">致谢了北京航空航天大学</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">新媒体艺术与设计学院</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-bottom: 0px;"><img style="vertical-align: middle;max-width: 100%;box-sizing: border-box;margin-bottom: 0px;visibility: visible !important;width: 677px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.44074074074074077" data-s="300,640" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=dae97774&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FOicCOBfngjylC3gUPqtVLtFOD0ibFiaiaLY2Y10DS2w1nsYVicLhTCTSWUyW6Ny7YDC81FaP06YcRQbcdfuupjdL53w%2F640%3Fwx_fmt%3Djpeg%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwxpic"/></p></div></div></div><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">8月12日</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">北京航空航天大学发文——</span></span></p><p style="text-align: center;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">《浪浪山小妖怪》导演、编剧於水</span></span></strong></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">是学校老师</span></span></p><p style="text-align: center;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">还有7名</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">学院毕业生参与</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">核心主创</span></span></strong></p><p style="text-align: center;margin-bottom: 0px;" nodeleaf=""><img data-imgfileid="502830504" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.6564814814814814" data-s="300,640" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 677px !important;height: auto;" type="block" src="https://wechat2rss.xlab.app/img-proxy/?k=8e75a5ac&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FIEccNBf01KhSZ9gLHzwxIGpvV9SICMMvJGIRdeq4FNgTTJBH7I9icApWCCEAyic30JhqvgMNCbqdJpnQibxOUibFiaA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></p></div></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-bottom: 0px;"><img style="vertical-align: middle;max-width: 100%;box-sizing: border-box;margin-bottom: 0px;visibility: visible !important;width: 677px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="1.500891265597148" data-s="300,640" data-w="561" src="https://wechat2rss.xlab.app/img-proxy/?k=dc147ea2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FOicCOBfngjylC3gUPqtVLtFOD0ibFiaiaLY2RiaicvNGJ4LmBXF3Zvs6PR4ou5A0JauvNPH0DTz7gV8RsksALyHMFU4A%2F640%3Fwx_fmt%3Dpng%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwxpic"/></p></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><div style="margin-bottom: 0px;"><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">两年半前</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">国产动画短片集</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">《中国奇谭》</span></span></strong></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">火爆全网</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">首集</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">《小妖怪的夏天》</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">中</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">在浪浪山辛苦“打工”的小猪妖</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">一句</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">“我想离开浪浪山！”</span></span></strong></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">曾让无数网友共情落泪</span></span></p></div></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-bottom: 0px;"><img style="vertical-align: middle;max-width: 100%;box-sizing: border-box;margin-bottom: 0px;visibility: visible !important;width: 677px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.4185185185185185" data-s="300,640" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=ecd8935d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FOicCOBfngjylC3gUPqtVLtFOD0ibFiaiaLY2Iw4m7JqxN4VT6KdryfV8cxpHibPHgOPWicQhxgqYENMWvocRBpQz4etQ%2F640%3Fwx_fmt%3Djpeg%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwxpic"/></p></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><div style="margin-bottom: 0px;"><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">在其</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">“平行宇宙”</span></span></strong></p><p style="text-align: center;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">《浪浪山小妖怪》</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">中</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">小猪妖终于走出了浪浪山</span></span></p></div></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-bottom: 0px;"><img style="vertical-align: middle;max-width: 100%;box-sizing: border-box;margin-bottom: 0px;visibility: visible !important;width: 677px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.6018518518518519" data-s="300,640" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=d4142cdc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FOicCOBfngjylC3gUPqtVLtFOD0ibFiaiaLY2w5ITWsxdgYnyUicUhtCEram9ML8963okL4tZMhEnbRmg2bIRImVfBqw%2F640%3Fwx_fmt%3Dpng%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwxpic"/></p></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><div style="margin-bottom: 0px;"><p style="text-align: center;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">浪浪山的小猪妖</span></span></strong></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">拉上</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">爱吐槽抱怨的蛤蟆精</span></span></strong></p><p style="text-align: center;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">十级话痨的黄鼠狼精</span></span></strong></p><p style="text-align: center;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">社恐内向的猩猩怪</span></span></strong></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">组织了一支</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">取经“拼好团”</span></span></strong></p></div></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-bottom: 0px;"><img style="vertical-align: middle;max-width: 100%;box-sizing: border-box;margin-bottom: 0px;visibility: visible !important;width: 677px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.42314814814814816" data-s="300,640" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=9bb9648d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FOicCOBfngjylC3gUPqtVLtFOD0ibFiaiaLY2LzXPFWlicqqThefPr5e33xiax9LI5VPXvAVw3yonDF6lblsrQ4M2IU4Q%2F640%3Fwx_fmt%3Djpeg%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwxpic"/></p></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><div style="margin-bottom: 0px;"><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">在这场西行中</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">它们虽然到最后都没有名字</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">也没有真正到达西天取得真经</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">但却在面对危险和诱惑时</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">坚持守住了初心</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">最终完成了</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">自我的修行</span></span></strong></p></div></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-bottom: 0px;"><img style="vertical-align: middle;max-width: 100%;box-sizing: border-box;margin-bottom: 0px;visibility: visible !important;width: 677px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.4046296296296296" data-s="300,640" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=f562e0b1&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FOicCOBfngjylC3gUPqtVLtFOD0ibFiaiaLY2LWjWBRicfR1poo7luiaJFiadAG1b7NHMnQlfPcRPVeeqrWfF173TgJMFQ%2F640%3Fwx_fmt%3Djpeg%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwxpic"/></p></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><div style="margin-bottom: 0px;"><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">北航介绍</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">剧本创作经历一年</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">所有</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">分镜画面</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">都由於水老师亲手绘制</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">据说乌鸦怪差点就成为了唐僧选角</span><img style="display: inline-block;vertical-align: middle;background-size: cover;margin-bottom: 0px;visibility: visible !important;width: 20px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="1" data-w="128" src="https://wechat2rss.xlab.app/img-proxy/?k=1794c953&amp;u=https%3A%2F%2Fres.wx.qq.com%2Ft%2Fwx_fed%2Fwe-emoji%2Fres%2Fassets%2FExpression%2FExpression_4%402x.png%3Fwxfrom%3D5%26wx_lazy%3D1%26tp%3Dwebp"/></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">不过因为形象太不符合</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">最后还是用蛤蟆来替代了乌鸦怪</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">乌鸦怪只在影片的开始部分出现</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">於水老师还客串为其配音</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-bottom: 0px;"><img data-imgfileid="506064912" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.6314814814814815" data-s="300,640" data-type="png" data-w="1080" style="border-style: solid;border-width: 1px;margin-bottom: 0px;visibility: visible !important;width: 677px !important;height: auto;" type="block" src="https://wechat2rss.xlab.app/img-proxy/?k=8f2be93f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2FNGEiao2Vd8N6ODj55JEMReneXrLkZxNoicibWyLibB8a8pWMrclBjO6PIUg2jxVicMuiacqZGBD5AvMRwiacw7E2icDz9A%2F640%3Fwx_fmt%3Djpeg%26from%3Dappmsg%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwxpic"/></p></div></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><div style="margin-bottom: 0px;"><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">在动画短片里</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">小猪妖</span></span><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">是</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">“打工人</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">”</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">到电影里</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">又成了四处拉人入伙的</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">创业者</span></span></strong></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">於水坦言</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">他想通过这些人物</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">展现普通年轻人的故事</span></span></p></div></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-bottom: 0px;"><img style="vertical-align: middle;max-width: 100%;box-sizing: border-box;margin-bottom: 0px;visibility: visible !important;width: 677px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.4685185185185185" data-s="300,640" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=4b311bcc&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FOicCOBfngjylC3gUPqtVLtFOD0ibFiaiaLY2MkSQXR4U8Xzs3VR5Y7u0A0PSwiartlXyImwkEGD1HypYXccJ58M6iadg%2F640%3Fwx_fmt%3Dpng%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwxpic"/></p></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><div style="margin-bottom: 0px;"><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">还有不少观众发现</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">电影中阁楼庙宇有</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">山西古建筑</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">的影子</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">作为山西人的导演於水表示</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">“每次去采风看到这些古代建筑</span></span></p><p style="text-align: center;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">就仿佛跨越时空，与那个时代的工匠对视</span></span></strong></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">这种令人震撼的共鸣让人想要落泪</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">想让更多观众感受到这种美。”</span></span></p></div></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><div style="margin-bottom: 0px;"><div style="margin-bottom: 0px;"><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-bottom: 0px;"><img style="vertical-align: middle;max-width: 100%;box-sizing: border-box;margin-bottom: 0px;visibility: visible !important;width: 677px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.562962962962963" data-s="300,640" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=bf58572e&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FOicCOBfngjylC3gUPqtVLtFOD0ibFiaiaLY24jjTAnWVK0acNwxrg8mrRCmEEX7VtarKnichRYGA2wiclsslpvCxBn6Q%2F640%3Fwx_fmt%3Djpeg%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwxpic"/></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-bottom: 0px;"><img style="vertical-align: middle;max-width: 100%;box-sizing: border-box;margin-bottom: 0px;visibility: visible !important;width: 677px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.562962962962963" data-s="300,640" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=38913885&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FOicCOBfngjylC3gUPqtVLtFOD0ibFiaiaLY2cmPMs6XYoV3lKGAZxuDwr95pruyEt8PY4IIsWaVTusBaCLs1XCjMkA%2F640%3Fwx_fmt%3Djpeg%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwxpic"/></p></div></div><div style="margin-bottom: 0px;"><div style="margin-bottom: 0px;"><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-bottom: 0px;"><img style="vertical-align: middle;max-width: 100%;box-sizing: border-box;margin-bottom: 0px;visibility: visible !important;width: 677px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.562962962962963" data-s="300,640" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=6dedd5ad&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FOicCOBfngjylC3gUPqtVLtFOD0ibFiaiaLY2iaVNkTKKxiaVoygUPJIN4vH28bXUXWlEvI3n9GWC5EWdOome8HoeiaQDw%2F640%3Fwx_fmt%3Djpeg%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwxpic"/></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-bottom: 0px;"><img style="vertical-align: middle;max-width: 100%;box-sizing: border-box;margin-bottom: 0px;visibility: visible !important;width: 677px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.562962962962963" data-s="300,640" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=e6f80761&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FOicCOBfngjylC3gUPqtVLtFOD0ibFiaiaLY2G16RsTUalqiah05WdfFr5I1yGMo0rBLibicUjgSiaKibqMZLPXszjQEr6UA%2F640%3Fwx_fmt%3Djpeg%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwxpic"/></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-bottom: 0px;"><img style="vertical-align: middle;max-width: 100%;box-sizing: border-box;margin-bottom: 0px;visibility: visible !important;width: 677px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.562962962962963" data-s="300,640" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=7b782de0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FOicCOBfngjylC3gUPqtVLtFOD0ibFiaiaLY2ewq32BakRhialIglWjo3brxVdo6dGUON1TRabkLdibKvs6jpUHDJPBWw%2F640%3Fwx_fmt%3Djpeg%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwxpic"/></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-bottom: 0px;"><img style="vertical-align: middle;max-width: 100%;box-sizing: border-box;margin-bottom: 0px;visibility: visible !important;width: 677px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.562962962962963" data-s="300,640" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=bb39d740&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FOicCOBfngjylC3gUPqtVLtFOD0ibFiaiaLY2FA4o5FONSI364TKm8VrMvT0ECC0Qg3TGF1XeXBs1eiad2GH2Pibzib5lg%2F640%3Fwx_fmt%3Djpeg%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwxpic"/></p></div></div></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><div style="margin-bottom: 0px;"><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">在於水看来</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">能让大家产生广泛共鸣的</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">不外乎这三个层面</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">“首先是</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">传统符号</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">，比如中式建筑、灯笼等</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">其次是</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">中式审美</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">，比如留白技艺和水墨画</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">第三点是</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">情感认同</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">”</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">就像猪妈妈对小猪妖的爱</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">藏在了每一句</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">“多喝水”</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">的叮嘱里</span></span></p></div></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-bottom: 0px;"><img style="vertical-align: middle;max-width: 100%;box-sizing: border-box;margin-bottom: 0px;visibility: visible !important;width: 677px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.42592592592592593" data-s="300,640" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=36ad4728&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2FOicCOBfngjylC3gUPqtVLtFOD0ibFiaiaLY2BaU3uVFyqfN1fh5rLJAhtIicziaEd9y7kX0tOd7gzue12Ja4dk7tdrsw%2F640%3Fwx_fmt%3Djpeg%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwxpic"/></p></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><div style="margin-bottom: 0px;"><p style="text-align: center;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">据了解，北航人</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">的身影贯穿创作全程</span></span></p><p style="text-align: center;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">杜伟、宋晔、武昊静、杨蕾</span></span></strong></p><p style="text-align: center;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">王笑然、李金秀、程宽</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">等</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">多名毕业生、在校学生</span></span><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">担任</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">核心创作</span></span></strong></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">於水将鲜活的</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">一线创作经验融入教学</span></span></strong></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">让学生在实践中获得成长</span></span></p></div></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><div style="margin-bottom: 0px;"><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">作为</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">新媒体艺术与设计学院</span></span></strong></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">数字动画艺术系系主任</span></span></p><p style="text-align: center;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">於水</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">始终坚持</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">将</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">创作实践</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">与</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">课堂教学</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">相融合</span></span></p></div></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 24px;"><div style="margin-bottom: 0px;"><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">他</span></span><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">教授的多门本研课程</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">深受同学们喜爱</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;">大家都说，</span><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">“水哥”的课一点都不水</span></span></p><p style="text-align: center;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">“干货很多”“收获很大”</span></span></strong></p></div></div><div style="caret-color: rgb(0, 0, 0);color: rgb(0, 0, 0);font-style: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;text-align: start;text-indent: 0px;text-transform: none;white-space: normal;word-spacing: 0px;-webkit-text-stroke-width: 0px;text-decoration: none;margin-bottom: 0px;"><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-bottom: 0px;"><img style="vertical-align: middle;max-width: 100%;box-sizing: border-box;margin-bottom: 0px;visibility: visible !important;width: 677px !important;height: auto;" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.5592592592592592" data-s="300,640" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=8b0c1824&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FOicCOBfngjylC3gUPqtVLtFOD0ibFiaiaLY2mxm6dwY42UPibHnSicXk5fCmvDJKPCIRzLLcHGALrxuFibPNaeNictP4ew%2F640%3Fwx_fmt%3Dpng%26wxfrom%3D5%26tp%3Dwxpic%26wx_lazy%3D1"/></p><div style="margin-bottom: 0px;"><div style="margin-bottom: 0px;"><div style="margin-bottom: 0px;"><div style="margin-bottom: 0px;"><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">浪浪山或许永远存在</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">但翻越它的勇气</span></span></p><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">本身就是可贵的</span></span></p></div></div></div></div><p style="text-align: center;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">希望每个人都可以</span></span></p><p style="text-align: center;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">活出自己喜欢的样子</span></span></strong></p><p style="text-align: center;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.6;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 18px;color: rgb(0, 122, 170);font-weight: bold;">愿我们，都能勇敢出发！</span></span></strong></p><hr style="max-width: 100%;letter-spacing: 0.544px;white-space: normal;font-family: PingFang SC, -apple-system-font, system-ui, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;background-color: rgb(255, 255, 255);border-style: solid;border-right-width: 0px;border-bottom-width: 0px;border-left-width: 0px;border-color: rgba(0, 0, 0, 0.098);transform-origin: 0px 0px;transform: scale(1, 0.5);box-sizing: border-box !important;overflow-wrap: break-word !important;margin-bottom: 0px;"/><p style="max-width: 100%;min-height: 1em;letter-spacing: 0.544px;white-space: normal;font-family: PingFang SC, -apple-system-font, system-ui, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;background-color: rgb(255, 255, 255);margin-bottom: 0px;box-sizing: border-box !important;overflow-wrap: break-word !important;"><span style="max-width: 100%;font-size: 16px;box-sizing: border-box !important;overflow-wrap: break-word !important;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 16px;">来源：中国青年报（ID：zqbcyol）综合北京航空航天大学、@电影浪浪山小妖怪、中国新闻周刊等</span></span></span></p><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p></div><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247526291">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=83d90d72&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526291%26idx%3D3%26sn%3D564cdf4bf6186a08aeb532625f3a848e">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Thu, 14 Aug 2025 17:38:00 +0800</pubDate>
    </item>
    <item>
      <title>点赞！985大学明确：不搞“非升即走”，不实行竞争性淘汰！</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526279&amp;idx=1&amp;sn=9bf7f7b2d157d3ac1617079a3837da28</link>
      <description>中国海洋大学明确：不搞“非升即走”，不实行竞争性淘汰！部分高校也一样！</description>
      <content:encoded><![CDATA[<p>
<span></span> <span>2025-08-13 20:05</span> <span style="display: inline-block;">浙江</span>
</p>

<p>中国海洋大学明确：不搞“非升即走”，不实行竞争性淘汰！部分高校也一样！</p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=f7ff8314&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2F87HjJEl4c1vYfT3hBNz81edS495hNWKpkiabu7YgaD1dSrxOh3Rib13GF8Gcr5gG5SCJP9FeMn7paLuGlABDSWHQ%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<p style="text-align: center;visibility: visible;margin-bottom: 24px;" nodeleaf=""><img alt="图片" class="rich_pages wxw-img" data-backh="323" data-backw="578" data-imgfileid="503016100" data-ratio="0.5583815028901734" data-s="300,640" type="block" data-type="png" data-w="865" style="margin-bottom: 0px;width: 677px !important;height: auto;visibility: visible !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=7d590dd7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fy4HJiaC1KLr8RS5UZtGPneibD2pRyiaUfwbZibM66Wk0WBkZGOHvT5aFk2ahJJ7VP1Agzcml6A3ueK0F4jdDMW3EIg%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><div style="visibility: visible;margin-bottom: 0px;"><p style="margin: 0px 0.5em;text-align: justify;color: rgb(60, 60, 60);letter-spacing: 0.5px;font-size: 16px;line-height: 2;visibility: visible;" mpa-paragraph-type="body"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-weight: normal;">饱受争议的“非升即走”，要改了？</span></span><span leaf="" style="visibility: visible;margin-bottom: 0px;"><br/></span></p><p style="margin: 0px 0.5em;text-align: justify;color: rgb(60, 60, 60);letter-spacing: 0.5px;font-size: 16px;line-height: 2;visibility: visible;" mpa-paragraph-type="body"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="color: rgb(217, 33, 66);font-weight: bold;">近日，中国海洋大学发布《中国海大诚邀您申报国家优青（海外）项目（新增批次）》一文，</span><span textstyle="" style="font-weight: normal;">在“</span></span><strong style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-weight: normal;">学校支持政策”部分提到：</span></span><strong style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-weight: normal;">稳定的职业保障。</span></span></strong><strong style="margin: 0px;text-align: left;color: rgb(0, 0, 0);letter-spacing: 0px;font-size: 16px;line-height: 1.6;visibility: visible;"></strong><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-weight: normal;">聘任为学校高层次人才工程教授，纳入学校事业编制，聘为博士生导师，设有薪酬增长机制，享受良好的学术环境，</span><span textstyle="" style="color: rgb(0, 0, 0);font-weight: bold;">无“非升即走”，不实行竞争性淘汰</span><span textstyle="" style="font-weight: normal;">。</span></span></strong></p><p style="margin: 0px 0.5em;text-align: justify;color: rgb(60, 60, 60);letter-spacing: 0.5px;font-size: 16px;line-height: 2;visibility: visible;" mpa-paragraph-type="body"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><br/></span></p><p style="text-align: center;margin-left: 8px;margin-right: 8px;padding: 0.5em;margin-bottom: 0px;box-sizing: border-box;visibility: visible;" nodeleaf="" data-mpa-action-id="me7udv0h1ehk"><img alt="图片" class="rich_pages wxw-img" data-imgfileid="503016103" data-ratio="0.4224137931034483" type="block" data-type="png" data-w="696" data-width="100%" style="box-shadow: rgb(210, 210, 210) 0px 0px 0.5em 0px;background-color: transparent;margin-bottom: 0px;width: 644px !important;height: auto;visibility: visible !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=c8ffb66f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fy4HJiaC1KLr8RS5UZtGPneibD2pRyiaUfwbdDt6TxSPJLOBk0HZGLlmRic92SyictKSLp4xPxSrvjDD6rfRW1wT2zWg%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: center;margin: 0px 8px;padding: 0.5em;box-sizing: border-box;visibility: visible;" nodeleaf="" data-mpa-action-id="me7udwslnek"><img alt="图片" class="rich_pages wxw-img" data-imgfileid="503016102" data-ratio="0.2874806800618238" type="block" data-type="png" data-w="647" data-width="100%" style="box-shadow: rgb(210, 210, 210) 0px 0px 0.5em 0px;background-color: transparent;margin-bottom: 0px;width: 644px !important;height: auto;visibility: visible !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=1c7e4323&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fy4HJiaC1KLr8RS5UZtGPneibD2pRyiaUfwbtib6fpo08ykjjzH6qqNSPXnQ6KgE9YScrdYq4BKLbOfhPVHFbCfZf4g%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="margin: 0px 0.5em;text-align: justify;color: rgb(60, 60, 60);letter-spacing: 0.5px;font-size: 16px;line-height: 2;visibility: visible;" mpa-paragraph-type="body"><strong style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="font-weight: bold;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-weight: normal;">多所高校近期发布的招聘公告也明确不搞</span></span><strong style="visibility: visible;margin-bottom: 0px;"><strong style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="font-weight: bold;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-weight: normal;">“</span></span></strong><span leaf="" style="font-weight: bold;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-weight: normal;">非升即走”。</span></span></strong></strong></p><div data-mpa-template="t" mpa-data-temp-power-by="yiban.io" mpa-from-tpl="t" data-mpa-action-id="me7u19r12ag" style="margin-bottom: 0px;"><div data-mpa-template="t" mpa-from-tpl="t" style="margin-bottom: 0px;"><div data-mpa-template="t" mpa-from-tpl="t" style="margin-bottom: 0px;"><div data-mpa-category="模板" data-mid="" mpa-from-tpl="t" style="display: flex;justify-content: center;align-items: center;margin-bottom: 0px;"><div data-mid="" mpa-from-tpl="t" style="display: flex;justify-content: center;align-items: center;margin-bottom: 0px;"><p data-mid="" mpa-from-tpl="t" style="background: rgb(230, 4, 45);width: 100px;height: 1px;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><br/></span></p><p nodeleaf="" style="margin-bottom: 0px;"><img data-imgfileid="503016101" alt="图片" class="rich_pages wxw-img __bg_gif" data-ratio="1" data-type="gif" data-w="150" style="background-color: transparent;margin-bottom: 0px;height: auto;width: 36px !important;visibility: visible !important;" src="https://wechat2rss.xlab.app/img-proxy/?k=ffc46bb2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_gif%2Fy4HJiaC1KLr8RS5UZtGPneibD2pRyiaUfwb9D1FrI0JNqUFVpibE27w8Q1no0iaKGrq2a1tfp3YX97qn0b5xoE027Fg%2F640%3Fwx_fmt%3Dgif%26from%3Dappmsg"/></p><p data-mid="" mpa-from-tpl="t" style="background: rgb(230, 4, 45);width: 100px;height: 1px;margin-bottom: 0px;"><span style="text-indent: 0em;color: rgb(230, 4, 45);font-size: 18px;letter-spacing: 0.5px;font-weight: bold;text-align: center;margin-bottom: 0px;"></span></p></div></div></div><p mpa-from-tpl="t" style="text-align: center;text-indent: 0em;margin-bottom: 0px;"><strong mpa-from-tpl="t" style="color: rgb(86, 86, 86);font-size: 18px;letter-spacing: 0.5px;margin-bottom: 0px;"><p style="clear: both;min-height: 1em;margin-bottom: 0px;"><strong style="text-indent: 0em;font-size: 17px;color: rgb(51, 51, 51);margin-bottom: 0px;" mpa-from-tpl="t"><span style="font-size: 18px;color: rgb(0, 0, 0);margin-bottom: 0px;" mpa-is-content="t"><span leaf="" style="margin-bottom: 0px;">不搞“非升即走”，成了招聘优势？</span></span><span leaf="" style="margin-bottom: 0px;"><br/></span></strong></p><p style="clear: both;min-height: 1em;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><br/></span></p></strong></p></div></div><p mpa-paragraph-type="body" style="-webkit-tap-highlight-color: transparent;margin: 0px 0.5em;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;clear: both;min-height: 1em;text-align: justify;color: rgb(62, 62, 62);letter-spacing: 0.5px;font-size: 16px;line-height: 2;"><span style="-webkit-tap-highlight-color: transparent;outline: 0px;max-width: 100%;clear: both;min-height: 1em;text-align: justify;color: rgb(62, 62, 62);letter-spacing: 0.5px;font-size: 16px;line-height: 2;box-sizing: border-box;overflow-wrap: break-word;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-weight: normal;">在普遍竞岗的背景下和严格的考核制度下，“996”“007”——这些曾距离大学校园非常遥远的词汇，盘旋在无数“青椒”头上</span></span></strong></span><span leaf="" style="-webkit-tap-highlight-color: transparent;outline: 0px;max-width: 100%;clear: both;min-height: 1em;text-align: justify;color: rgb(62, 62, 62);letter-spacing: 0.5px;font-size: 16px;line-height: 2;box-sizing: border-box;overflow-wrap: break-word;margin-bottom: 0px;"><span textstyle="" style="font-weight: normal;">。</span></span><span leaf="" style="margin-bottom: 0px;">马不停蹄发论文、申项目，在考核压力下不断内卷.....“疲于奔命”的背后，是青年教师幸福感降低、竞相追逐短期成效乃至无人敢坐“冷板凳”等诸多问题。“青椒”已然成为了“青焦”。</span></p><p mpa-paragraph-type="body" style="-webkit-tap-highlight-color: transparent;margin: 0px 0.5em;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;clear: both;min-height: 1em;text-align: justify;color: rgb(62, 62, 62);letter-spacing: 0.5px;font-size: 16px;line-height: 2;"><span leaf="" style="margin-bottom: 0px;">处于“非升即走”争议漩涡的高校，也开始重新审视这一制度。其中，有部分高校宣布：</span><span style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;color: rgb(0, 0, 0);"><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;"><span leaf="" style="margin-bottom: 0px;">不采用“非升即走”或类似招录模式，不实行竞争性淘汰</span></strong></span><span leaf="" style="margin-bottom: 0px;">。</span></p><p mpa-paragraph-type="body" style="-webkit-tap-highlight-color: transparent;margin: 0px 0.5em;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;clear: both;min-height: 1em;text-align: justify;color: rgb(62, 62, 62);letter-spacing: 0.5px;font-size: 16px;line-height: 2;"><span leaf="" style="margin-bottom: 0px;"><br/></span></p><p style="text-align: center;margin-left: 8px;margin-right: 8px;margin-bottom: 0px;" nodeleaf=""><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-imgfileid="503016105" data-ratio="1.3317811408614668" type="block" data-type="png" data-w="859" data-width="100%" style="margin-bottom: 0px;width: 661px !important;height: auto;" src="https://wechat2rss.xlab.app/img-proxy/?k=a6b912e0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fy4HJiaC1KLr8RS5UZtGPneibD2pRyiaUfwbMbqxqzex18laLuZSzibUJgdsuKGMDIvYiaGU5SucLS5u71mCM7HTHfcw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="margin: 0px 0.5em;text-align: justify;color: rgb(60, 60, 60);letter-spacing: 0.5px;font-size: 16px;line-height: 2;"><span leaf="" style="font-weight: bold;margin-bottom: 0px;"><span textstyle="" style="font-weight: normal;">不过，这些高校对“非升即走”说不，是否就意味着这一制度即将逐步取消？</span></span></p><p style="margin: 0px 0.5em;text-align: justify;color: rgb(60, 60, 60);letter-spacing: 0.5px;font-size: 16px;line-height: 2;"><span leaf="" style="font-weight: bold;margin-bottom: 0px;"><span textstyle="" style="font-weight: normal;">在《中国科学报》</span></span><span leaf="" style="font-weight: bold;margin-bottom: 0px;"><span textstyle="" style="font-weight: normal;">2022年的一则报道中，长期关注高校教师问题的北京理工大学人文学院副研究员刘进接受采访时提到，</span></span><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-weight: normal;">学校对于“非升即走”制度的“书面拒绝”，</span><span textstyle="" style="color: rgb(0, 0, 0);font-weight: bold;">并不意味着这项制度已经迎来所谓“拐点”</span><span textstyle="" style="font-weight: normal;">。</span></span><span leaf="" style="font-weight: bold;margin-bottom: 0px;"><br/></span></p><p style="margin: 0px 0.5em;text-align: justify;color: rgb(60, 60, 60);letter-spacing: 0.5px;font-size: 16px;line-height: 2;"><span leaf="" style="font-weight: bold;margin-bottom: 0px;"><span textstyle="" style="font-weight: normal;">高校人才招聘时不采用“非升即走”的策略，主要原因可归纳为以下两点：一是部分高校的内部机制尚未理顺，二是针对一些教师对于国内“非升即走”的不满情绪，有些高校希望能</span><span textstyle="" style="color: rgb(0, 0, 0);font-weight: bold;">在学术劳动力市场上“反其道而行之”，形成自己的“竞争优势”。</span></span></p><div data-mpa-template="t" mpa-data-temp-power-by="yiban.io" data-mpa-action-id="me7vrpyzdrk" style="margin-bottom: 0px;"><div data-mpa-template="t" mpa-from-tpl="t" style="margin-bottom: 0px;"><div data-mpa-template="t" mpa-from-tpl="t" style="margin-bottom: 0px;"><div data-mpa-category="模板" data-mid="" mpa-from-tpl="t" style="display: flex;justify-content: center;align-items: center;margin-bottom: 0px;"><div data-mid="" mpa-from-tpl="t" style="display: flex;justify-content: center;align-items: center;margin-bottom: 0px;"><p data-mid="" mpa-from-tpl="t" style="background: rgb(230, 4, 45);width: 100px;height: 1px;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><br/></span></p><p nodeleaf="" style="margin-bottom: 0px;"><img data-imgfileid="503016106" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder __bg_gif" data-ratio="1" data-type="gif" data-w="150" style="background-color: transparent;margin-bottom: 0px;width: 36px !important;height: auto;" src="https://wechat2rss.xlab.app/img-proxy/?k=ffc46bb2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_gif%2Fy4HJiaC1KLr8RS5UZtGPneibD2pRyiaUfwb9D1FrI0JNqUFVpibE27w8Q1no0iaKGrq2a1tfp3YX97qn0b5xoE027Fg%2F640%3Fwx_fmt%3Dgif%26from%3Dappmsg"/></p><p data-mid="" mpa-from-tpl="t" style="background: rgb(230, 4, 45);width: 100px;height: 1px;margin-bottom: 0px;"><span style="text-indent: 0em;color: rgb(230, 4, 45);font-size: 18px;letter-spacing: 0.5px;font-weight: bold;text-align: center;margin-bottom: 0px;"></span></p></div></div></div><p mpa-from-tpl="t" style="text-align: center;text-indent: 0em;margin-bottom: 0px;"><strong mpa-from-tpl="t" style="color: rgb(86, 86, 86);font-size: 18px;letter-spacing: 0.5px;margin-bottom: 0px;"><p style="clear: both;min-height: 1em;margin-bottom: 0px;"><strong style="text-indent: 0em;font-size: 17px;color: rgb(51, 51, 51);margin-bottom: 0px;" mpa-from-tpl="t"><span style="font-size: 18px;color: rgb(0, 0, 0);margin-bottom: 0px;" mpa-is-content="t"><span leaf="" style="margin-bottom: 0px;">变味的“非升即走”</span></span><span leaf="" style="margin-bottom: 0px;"><br/></span></strong></p></strong></p></div></div><p mpa-paragraph-type="body" style="-webkit-tap-highlight-color: transparent;margin: 0px 0.5em;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;clear: both;min-height: 1em;text-align: justify;color: rgb(60, 60, 60);letter-spacing: 0.5px;font-size: 16px;line-height: 2;"><span leaf="" style="margin-bottom: 0px;">上世纪90年代起，我国高校开始探索引入“非升即走”。作为一种竞争性的筛选制度，该政策在提升高校学术产出、激活教师科研主动性、优化师资结构方面发挥了积极作用。</span></p><p mpa-paragraph-type="body" style="-webkit-tap-highlight-color: transparent;margin: 0px 0.5em;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;clear: both;min-height: 1em;text-align: justify;color: rgb(60, 60, 60);letter-spacing: 0.5px;font-size: 16px;line-height: 2;"><span leaf="" style="margin-bottom: 0px;">有学术论文以148所大学为样本研究发现，</span><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-align: left;color: rgb(0, 0, 0);letter-spacing: 0px;font-size: 16px;line-height: 1.6;"><span leaf="" style="margin-bottom: 0px;">实行“非升即走”的高校，科研产出提高了103.02%</span></strong><span leaf="" style="margin-bottom: 0px;">。而且高校在选择青年教师时，拥有了更多可参考、可比较的对象。目前，我国的“双一流”高校几乎已全部采用“非升即走”制度。</span></p><p mpa-paragraph-type="body" style="-webkit-tap-highlight-color: transparent;margin: 0px 0.5em;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;clear: both;min-height: 1em;text-align: justify;color: rgb(60, 60, 60);letter-spacing: 0.5px;font-size: 16px;line-height: 2;"><span leaf="" style="margin-bottom: 0px;">然而，随着博士招生规模的扩大，以及高等教育专任教师人数的增长，高校入职门槛和考核标准不断拉高。学术道路上处处潜伏着被淘汰的风险，当“走”成了重点，“青椒”们为了通过考核，越来越“卷”。</span></p><p mpa-paragraph-type="body" style="-webkit-tap-highlight-color: transparent;margin: 0px 0.5em;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;clear: both;min-height: 1em;text-align: justify;color: rgb(60, 60, 60);letter-spacing: 0.5px;font-size: 16px;line-height: 2;"><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-align: left;color: rgb(0, 0, 0);letter-spacing: 0px;font-size: 16px;line-height: 1.6;"><span leaf="" style="margin-bottom: 0px;">“非升即走”要求教师在培育期内发表一定数量的论文。</span></strong><span leaf="" style="margin-bottom: 0px;">某985大学老师透露，必须完成4篇“SCI/SSCI 2区及以上或核心期刊”论文和1个国家级基金项目的“最低标准”，才可能评上副教授并留任。</span></p><p mpa-paragraph-type="body" style="-webkit-tap-highlight-color: transparent;margin: 0px 0.5em;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;clear: both;min-height: 1em;text-align: justify;color: rgb(60, 60, 60);letter-spacing: 0.5px;font-size: 16px;line-height: 2;"><span leaf="" style="margin-bottom: 0px;">除了发论文，</span><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-align: left;color: rgb(0, 0, 0);letter-spacing: 0px;font-size: 16px;line-height: 1.6;"><span leaf="" style="margin-bottom: 0px;">拿到相应级别的项目课题，是“晋升”的关键也是最难的一项。</span></strong><span leaf="" style="margin-bottom: 0px;">据数据显示，青年科学基金项目这一直接影响着”青椒“未来其他申请及职称评定的项目上，2019年到2023年，该项目申请量增长率达33.8%，然而项目资助率却在17%左右徘徊。一些更难的人才类项目，如优青和杰青申请量也持续增加。</span></p><p mpa-paragraph-type="body" style="-webkit-tap-highlight-color: transparent;margin: 0px 0.5em;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;clear: both;min-height: 1em;text-align: justify;color: rgb(60, 60, 60);letter-spacing: 0.5px;font-size: 16px;line-height: 2;"><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-align: left;color: rgb(0, 0, 0);letter-spacing: 0px;font-size: 16px;line-height: 1.6;"><span leaf="" style="margin-bottom: 0px;">另一方面，科研与教学也在逐渐失去平衡。</span></strong><span leaf="" style="margin-bottom: 0px;">科研产出作为最核心的考核指标，分走了青年教师们的大多数精力，在教学投入方面“心有余而力不足”。</span></p><p mpa-paragraph-type="body" style="-webkit-tap-highlight-color: transparent;margin: 0px 0.5em;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;clear: both;min-height: 1em;text-align: justify;color: rgb(60, 60, 60);letter-spacing: 0.5px;font-size: 16px;line-height: 2;"><span leaf="" style="margin-bottom: 0px;">此外，之前“非升即走”主要针对刚入校的青年教师，例如助理教授或讲师，一般升为副教授或教授后，就可享受长期聘用待遇。但如今，“非升即走”范围扩大至副教授，不少教师直言“副教授也不能躺平了”。</span></p><div data-mpa-template="t" mpa-from-tpl="t" style="margin-bottom: 0px;"><div data-mpa-template="t" mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;"><div data-mpa-template="t" mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;"><div data-mpa-category="模板" data-mid="" mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;display: flex;justify-content: center;align-items: center;"><div data-mid="" mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;display: flex;justify-content: center;align-items: center;"><p data-mid="" mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;background: rgb(230, 4, 45);width: 100px;height: 1px;"><span leaf="" style="margin-bottom: 0px;"><br/></span></p><p nodeleaf="" style="margin-bottom: 0px;"><img data-imgfileid="503016107" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder __bg_gif" data-ratio="1" data-type="gif" data-w="150" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;vertical-align: bottom;visibility: visible;width: 36px !important;height: auto;" src="https://wechat2rss.xlab.app/img-proxy/?k=ffc46bb2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_gif%2Fy4HJiaC1KLr8RS5UZtGPneibD2pRyiaUfwb9D1FrI0JNqUFVpibE27w8Q1no0iaKGrq2a1tfp3YX97qn0b5xoE027Fg%2F640%3Fwx_fmt%3Dgif%26from%3Dappmsg"/></p><p data-mid="" mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;background: rgb(230, 4, 45);width: 100px;height: 1px;"><span style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-indent: 0em;color: rgb(230, 4, 45);font-size: 18px;letter-spacing: 0.5px;font-weight: bold;text-align: center;"></span></p></div></div></div><p mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-align: center;text-indent: 0em;"><strong mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;color: rgb(86, 86, 86);font-size: 18px;letter-spacing: 0.5px;"><p style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;clear: both;min-height: 1em;"><strong mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-indent: 0em;font-size: 17px;color: rgb(51, 51, 51);"><span mpa-is-content="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;font-size: 18px;color: rgb(0, 0, 0);"><span leaf="" style="margin-bottom: 0px;">长聘制不是“少数人的游戏”</span></span></strong></p></strong></p></div></div><p mpa-paragraph-type="body" style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">重新审视并对这一制度“动刀”，复旦大学做了先行者。今年年初，</span><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">复旦大学</span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">校长金力</span></strong><span style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">表示，学校将对</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">“准聘—长聘”制度</span></strong><span style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">进行一场“大手术”式的</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">彻底改革</span></strong><span style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">，包括不限定留下的人数，改为</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">“先留后升”</span></strong><span style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">的制度，</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">准聘和长聘之间间隔6年</span></strong><span style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">，存量教师也将做长聘认定，且</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">只有一次纳入长聘制的机会</span><span leaf="" style="margin-bottom: 0px;">。</span></strong></p><p mpa-paragraph-type="body" style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">早在2022年的“对话大脑”院士论坛上，金力就曾透露，复旦将推出“非升即走”的替代计划，不升也能留，只要青年科学家在行业内做得足够好，就可以留下来。</span></p><p mpa-paragraph-type="body" style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">在2025年春季工作会议上校长金力表示，长聘制不是“少数人的游戏”，而将影响每一名教师的职业生涯，是老师们在复旦职业发展的主渠道。</span><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-align: left;color: rgb(0, 0, 0);letter-spacing: 0px;font-size: 16px;line-height: 1.6;"><span leaf="" style="margin-bottom: 0px;">长聘体系的核心不是“非升即走”，</span></strong><span leaf="" style="margin-bottom: 0px;">为了选拔最具内驱动力和发展潜力的优秀人才，复旦大学跳出“非升即走”，</span><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-align: left;color: rgb(0, 0, 0);letter-spacing: 0px;font-size: 16px;line-height: 1.6;"><span leaf="" style="margin-bottom: 0px;">对有多少人能留下来是不限定的，</span></strong><span leaf="" style="margin-bottom: 0px;">只要优秀就能留。而且原来是晋升职称以后才能留，</span><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-align: left;color: rgb(0, 0, 0);letter-spacing: 0px;font-size: 16px;line-height: 1.6;"><span leaf="" style="margin-bottom: 0px;">现在是先留下来才可以升，把“升”和“留”的先后次序换了一下。</span></strong></p><p mpa-paragraph-type="body" style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">金力校长还指出，新的制度设计将包含三个部分：一是</span><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-align: left;color: rgb(0, 0, 0);letter-spacing: 0px;font-size: 16px;line-height: 1.6;"><span leaf="" style="margin-bottom: 0px;">按教研、研究和教学三个系列，</span></strong><span leaf="" style="margin-bottom: 0px;">实施教师分类管理；二是按</span><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-align: left;color: rgb(0, 0, 0);letter-spacing: 0px;font-size: 16px;line-height: 1.6;"><span leaf="" style="margin-bottom: 0px;">助理教授、准聘副教授、长聘副教授、长聘教授、特聘教授、首席教授，</span></strong><span leaf="" style="margin-bottom: 0px;">构建准聘-长聘教职体系；三是</span><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-align: left;color: rgb(0, 0, 0);letter-spacing: 0px;font-size: 16px;line-height: 1.6;"><span leaf="" style="margin-bottom: 0px;">以年薪制为核心，</span></strong><span leaf="" style="margin-bottom: 0px;">推进薪酬体系改革。</span></p><p mpa-paragraph-type="body" style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><br/></span></p><p mpa-paragraph-type="image" style="margin-bottom: 0px;" nodeleaf=""><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-imgfileid="503016110" data-ratio="1.3333333333333333" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;vertical-align: bottom;visibility: visible;width: 677px !important;height: auto;" data-type="png" data-w="864" data-width="100%" src="https://wechat2rss.xlab.app/img-proxy/?k=84921656&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fy4HJiaC1KLr8RS5UZtGPneibD2pRyiaUfwbxuiakXiaibbNSSED1a3dGsnnLNk22AqI9AaAAzR7KraHb784MfFOyJGNQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p mpa-paragraph-type="body" style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">留下来后，如何更好地培养青年人才也是复旦关注的焦点。长聘制将结合“四卓”计划、Mentor制等，</span><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-align: left;color: rgb(0, 0, 0);letter-spacing: 0px;font-size: 16px;line-height: 1.6;"><span leaf="" style="margin-bottom: 0px;">全周期、全方位、个性化引导支持人才发展，</span></strong><span leaf="" style="margin-bottom: 0px;">落实资源跟着人才走，让人才引得进、长得快、干得好。</span></p><p mpa-paragraph-type="body" style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">为了全力规避长聘后的“躺平”问题，复旦大学完善奖励性绩效体系、空间分配模式，持续激发教师创新创造活力，</span></p><p mpa-paragraph-type="body" style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">此外，</span><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-align: left;color: rgb(0, 0, 0);letter-spacing: 0px;font-size: 16px;line-height: 1.6;"><span leaf="" style="margin-bottom: 0px;">对于人事制度改革前的教师，复旦大学也将做长聘认定，但只有一次机会纳入长聘制。</span></strong><span leaf="" style="margin-bottom: 0px;">作为一种过渡的做法，如果教师没有通过认定，之后学校在生源等方面的资源配置，就不再向他们倾斜了，之前的改革没有动这部分存量教师。</span></p><div data-mpa-template="t" mpa-from-tpl="t" style="margin-bottom: 0px;"><div data-mpa-template="t" mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;"><div data-mpa-template="t" mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;"><div data-mpa-category="模板" data-mid="" mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;display: flex;justify-content: center;align-items: center;"><div data-mid="" mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;display: flex;justify-content: center;align-items: center;"><p data-mid="" mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;background: rgb(230, 4, 45);width: 100px;height: 1px;"><span leaf="" style="margin-bottom: 0px;"><br/></span></p><p nodeleaf="" style="margin-bottom: 0px;"><img data-imgfileid="503016108" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder __bg_gif" data-ratio="1" data-type="gif" data-w="150" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;vertical-align: bottom;visibility: visible;width: 36px !important;height: auto;" src="https://wechat2rss.xlab.app/img-proxy/?k=ffc46bb2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_gif%2Fy4HJiaC1KLr8RS5UZtGPneibD2pRyiaUfwb9D1FrI0JNqUFVpibE27w8Q1no0iaKGrq2a1tfp3YX97qn0b5xoE027Fg%2F640%3Fwx_fmt%3Dgif%26from%3Dappmsg"/></p><p data-mid="" mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;background: rgb(230, 4, 45);width: 100px;height: 1px;"><span style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-indent: 0em;color: rgb(230, 4, 45);font-size: 18px;letter-spacing: 0.5px;font-weight: bold;text-align: center;"></span></p></div></div></div><p mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-align: center;text-indent: 0em;"><strong mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;color: rgb(86, 86, 86);font-size: 18px;letter-spacing: 0.5px;"><p style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;clear: both;min-height: 1em;"><strong mpa-from-tpl="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-indent: 0em;font-size: 17px;color: rgb(51, 51, 51);"><span mpa-is-content="t" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;font-size: 18px;color: rgb(0, 0, 0);"><span leaf="" style="margin-bottom: 0px;">“非升即走”，何去何从？</span></span></strong></p></strong></p></div></div><p mpa-paragraph-type="body" style="margin-bottom: 0px;"><span style="margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-weight: normal;">著名学者饶毅</span></span></strong></span><span leaf="" style="margin-bottom: 0px;">曾在谈到“非升即走”预聘制时表示，预聘制是中国高等学校二十年来最重要的人事改革，是中国高校质量提高、学术进步必不可少的一步。</span><span style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;color: rgb(0, 0, 0);"><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;"><span leaf="" style="margin-bottom: 0px;">是否用预聘制不是问题，各个学校何时用预聘制，怎么用好预聘制，都是需要认真探讨的问题</span></strong></span><span leaf="" style="margin-bottom: 0px;">。</span></p><p mpa-paragraph-type="body" style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><br/></span></p><p style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">2023年两会，民盟中央拟向全国政协提交《关于进一步加强我国高校教师队伍建设的提案》。其中建议，在评价和管理上给予教师自主空间，</span><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="color: rgb(0, 0, 0);">将“非升即走”缓慢过渡成“非升即转”的人性化转岗机制。</span></span></strong></p><p mpa-paragraph-type="body" style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">而今年两会期间，全国政协委员、中国民办教育协会副会长李孝轩也提出，目前高校“非升即走”制度存在“评价标准单一失衡”问题。对此，他建议，</span><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="color: rgb(0, 0, 0);">改革高校人才评价体系，根据学科、岗位特性，建立多元、分类评价体系。</span></span></strong></p><p mpa-paragraph-type="body" style="margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="color: rgb(0, 0, 0);">教育部部长怀进鹏曾表示，要对高校青年科技人才</span></span></strong><span style="margin-bottom: 0px;"><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="color: rgb(0, 0, 0);">允许试错、宽容失败。</span></span></strong></span><span style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">“非升即走”作为博士毕业生走入高校的第一步，既是考核标准，又是培养手段。青年教师正处在创造力旺盛的快速成长阶段，在这条探索之路上，如何能够设置更为多元、丰富、公平、合理的考核机制，让考核成为激励他们不断进步的原动力，而不是悬在头顶的利剑，让更多优秀的青年教师脱颖而出，才尽其用，仍有待探索。</span></span></p><div data-support="主编编辑器" data-style-id="20422" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;color: rgba(0, 0, 0, 0.9);font-family: PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: 0.544px;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;background-color: rgb(255, 255, 255);caret-color: rgb(34, 34, 34);"><div style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;"><div style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><ul style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px 0px 0px 30px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;list-style-type: none;" class="list-paddingleft-1"><li style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;"><div style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;caret-color: rgb(0, 0, 0);visibility: visible;"><div style="-webkit-tap-highlight-color: transparent;margin: 0px auto;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;overflow: hidden;visibility: visible;"><div style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px 0px 0.4em;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;border-bottom: 1px solid rgb(0, 0, 0);visibility: visible;"><div style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px 0px 0px 10px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;border-left: 0.2em solid rgb(224, 38, 58);visibility: visible;"><p style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;clear: both;min-height: 1em;visibility: visible;"><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;visibility: visible;"><span style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;color: rgb(160, 160, 160);font-size: 14px;visibility: visible;"><span style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;letter-spacing: 0.544px;visibility: visible;"><span leaf="" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;">信息来源：</span><span leaf="" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">软科综合自中国海洋大学等</span><span leaf="" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;">。</span></span></span></strong></p><p msttexthash="273786136" msthash="95" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;clear: both;min-height: 1em;letter-spacing: 0.544px;display: inline-block;vertical-align: top;visibility: visible;"><span style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;color: rgb(217, 33, 66);visibility: visible;"><strong style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;visibility: visible;"><span style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;font-size: 14px;visibility: visible;"><span leaf="" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;">转载请注明信息来源及海洋知圈编排。</span></span></strong></span></p></div></div></div></div></li></ul><div style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;"><div style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;letter-spacing: 0.544px;color: rgb(160, 160, 160);caret-color: rgb(0, 0, 0);"><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p><p data-md5="76bee" msttexthash="284643580" msthash="116" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;clear: both;min-height: 1em;text-align: right;"><strong istranslated="1" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;letter-spacing: 0.544px;"><span istranslated="1" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;font-size: 15px;color: rgb(216, 40, 33);"><strong istranslated="1" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;letter-spacing: 0.544px;font-size: 16px;"><span istranslated="1" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;white-space-collapse: preserve;letter-spacing: 0.544px;font-family: monospace;color: rgb(255, 255, 255);background-color: rgb(192, 0, 0);"><span istranslated="1" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;text-align: center;line-height: 38.4px;"><strong istranslated="1" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;letter-spacing: 0.544px;text-align: right;color: rgb(160, 160, 160);"><span istranslated="1" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;font-size: 15px;color: rgb(216, 40, 33);"><span style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;letter-spacing: 0.544px;color: rgb(255, 255, 255);text-align: center;line-height: 38.4px;"><span leaf="" style="-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box;overflow-wrap: break-word;"><br/></span></span></span></strong></span></span></strong></span></strong></p></div></div></div></div></div></div><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247526279">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=06707661&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526279%26idx%3D1%26sn%3D9bf7f7b2d157d3ac1617079a3837da28">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 13 Aug 2025 20:05:00 +0800</pubDate>
    </item>
    <item>
      <title>【Python】没错，最强的Python编辑器还是它</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526279&amp;idx=2&amp;sn=9a71ea260ebff76bf644604058d713de</link>
      <description></description>
      <content:encoded><![CDATA[<p>
<span>Python大数据分析</span> <span>2025-08-13 20:05</span> <span style="display: inline-block;">浙江</span>
</p>




<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=ccff482c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2Fg64sbb6Ffmct87Zh8onWXXF6gm5oibE0AvKq8tWjVtichYqMoEbMa46Yr4ayHqCjiaPKZlucQ8S3ofR51YuHUU00Q%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<div data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 10px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: linear-gradient(90deg, rgba(50, 0, 0, 0.05) 3%, rgba(0, 0, 0, 0) 3%), linear-gradient(360deg, rgba(50, 0, 0, 0.05) 3%, rgba(0, 0, 0, 0) 3%);background-origin: padding-box;background-repeat: no-repeat;background-size: 20px 20px;width: auto;font-family: Optima-Regular, ptima-Regular, ptima-Regular, ptima-Regular, ptima-Regular;font-size: 16px;color: rgb(89, 89, 89);line-height: 1.75;word-spacing: 0em;letter-spacing: 2px;word-break: break-word;overflow-wrap: break-word;text-align: left;background-position-x: center;background-position-y: center;" data-pm-slice="0 0 []"><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">有人问，为什么python最强大的IDE是收费的PyCharm?</span></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="511601377" data-ratio="0.30462962962962964" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=c70ae976&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmct87Zh8onWXXF6gm5oibE0AKNDcUVpUAq7tibJ8riae1N2Efo40J1UoUu4WukeJ9KLXhrPAH2UJqNXg%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">pycharm确实仍然是最好的python编辑器，而不是很多人说的vscode。pycharm是原生深度集成python开发的，适合从初级到大型各种项目，vscode则依靠插件，微软官方python插件很好，但第三方的插件就良莠不齐，集成兼容性能也堪忧。</span></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="511601380" data-ratio="0.612037037037037" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=474df886&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmct87Zh8onWXXF6gm5oibE0AqfVLgiaj56OHB4uHuhqbIkkTPCTHyxDx8yI9BgxeibJf2y8RsYcgF40A%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">pycharm有社区版是免费使用的，专业版需要收费，其实社区版已经完全够一般开发者使用了，也很适合python初学者上手，不需要复杂的环境配置，直接安装python和pycharm就可以用了。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">我觉得pycharm和vscode开发python的对比，有几点是可以说道说道的。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">如果你是python初学者，就想用python做一些简单的自动化或者爬虫之类的任务，建议用pycharm社区版。因为pycharm用起来简单，不容易出错，比如什么虚拟环境搭建、依赖管理、代码补全、debug等都很方便，都内置好稳定的功能，不需要你去配置，很适合初学者。</span></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="511601379" data-ratio="0.7092592592592593" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=bd2f2d33&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmct87Zh8onWXXF6gm5oibE0ALBRQgTYicqIN0aBQtH8SJ3woDuKt1JaLGWc0Hbn7CLJ8jyiahhtAykvQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">如果你想开发大型的python项目，比如web网站搭建、GUI开发等，建议用pycharm专业版，因为它的功能足够完备，从编码、调试、部署、协作都有很专业的支持，而且系统效率高，代码索引和补全延迟更低。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">大型项目需要更多的技术集成，pycharm原生支持flask、Django、pyqt、pandas等大型框架的调试、开发、环境部署等，还有开箱即用的工具，比如连接各种PostgreSQL等主流数据库，保证大型项目的开发效率。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">有人说pycharm资源占用好，很耗内存，但是它足够稳定，这对于大型项目来说很重要。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="511601381" data-ratio="0.5950920245398773" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-left-radius: 6px;border-top-right-radius: 6px;border-bottom-right-radius: 6px;border-bottom-left-radius: 6px;object-fit: contain;" data-type="png" data-w="978" src="https://wechat2rss.xlab.app/img-proxy/?k=2ca5a881&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmct87Zh8onWXXF6gm5oibE0A8muErHYicUCKBN2JXlicKosjvVn41ZAEtkTQCVvmzLib1Xyhv5feC1SIA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/>那什么场景适用用Vscode 开发python 呢？我觉得如果想做 你python 数据科学、算法开发、大模型应用等，并且喜欢各种新奇的开源工具、三方插件，Vscode 也是不二选择，因为Vscode 本身是个百宝箱，靠各种插件的合作开发有趣的项目，比如你能在 vscode 中很好的使用 notebook 来写代码、玩数据。</span></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="511601378" data-ratio="0.6252465483234714" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-type="png" data-w="1014" src="https://wechat2rss.xlab.app/img-proxy/?k=9460b40a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmct87Zh8onWXXF6gm5oibE0Ahw30XBla9rZ4kxFjevSh3V9FaJfb9oGob7fJFjTJEibNatyy0PyryEQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">另外如果你用多种编程语言开发，也建议选择 vscode ，方便切换和协作。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">总的来说，我还是觉得 pycharm 是最好的 Python 编辑器，因为它专业、稳定、性能强，也适合初中高级开发者用，没什么门槛。</span></p><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p></div><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247526279">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=31cce1d1&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526279%26idx%3D2%26sn%3D9a71ea260ebff76bf644604058d713de">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 13 Aug 2025 20:05:00 +0800</pubDate>
    </item>
    <item>
      <title>我的论文可能被AI审稿了</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526279&amp;idx=3&amp;sn=b07228752a77d8bf86711a99c18a1b87</link>
      <description></description>
      <content:encoded><![CDATA[<p>
<span></span> <span>2025-08-13 20:05</span> <span style="display: inline-block;">浙江</span>
</p>




<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=59c95721&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2F87HjJEl4c1vYfT3hBNz81edS495hNWKpw3DIJXKScoUX8c83RkvKicvCHSiaR47MfpaCE5f276LAkdOYHH5iaWsyA%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<div style="letter-spacing: 0px;line-height: 1.15;box-sizing: border-box;font-style: normal;font-weight: 400;text-align: justify;font-size: 16px;color: rgb(62, 62, 62);visibility: visible;margin-bottom: 24px;"><div style="max-width: 100%;width: 100%;box-sizing: border-box;visibility: visible;margin-bottom: 0px;"><div style="text-align: left;flex-flow: row;box-sizing: border-box;max-width: 100%;width: 100%;visibility: visible;margin-bottom: 0px;"><div style="display: flex;justify-content: flex-start;flex-direction: row;max-width: 100%;box-sizing: border-box;visibility: visible;margin-bottom: 0px;"><div style="max-width: 100%;display: inline-block;width: 100%;flex: 0 0 auto;align-self: flex-start;vertical-align: top;box-sizing: border-box;visibility: visible;margin-bottom: 0px;"><div style="display: inline-block;background-color: rgb(241, 241, 241);padding: 0px 22px;box-sizing: border-box;width: 100%;visibility: visible;margin-bottom: 0px;"><div style="box-sizing: border-box;visibility: visible;margin-bottom: 0px;"><div style="max-width: 100%;box-sizing: border-box;visibility: visible;margin-bottom: 0px;"><div style="text-align: justify;line-height: 1.5;box-sizing: border-box;max-width: 100%;font-size: 15px;visibility: visible;margin-bottom: 0px;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;visibility: visible;"><strong style="letter-spacing: 0px;box-sizing: border-box;visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">编者注：</span></strong></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">Seongjin Hong说：“我们的论文被拒绝的原因是审稿人的评论模糊、公式化、往往不相关，偶尔也不准确。</span></p></div></div><div style="text-align: justify;box-sizing: border-box;visibility: visible;margin-bottom: 0px;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><br/></span></p></div></div></div></div></div></div></div><div style="max-width: 100%;box-sizing: border-box;visibility: visible;margin-bottom: 0px;"><div style="text-align: left;line-height: 1.5;box-sizing: border-box;max-width: 100%;visibility: visible;margin-bottom: 0px;"><div style="box-sizing: border-box;visibility: visible;margin-bottom: 0px;"><div style="text-align: justify;box-sizing: border-box;visibility: visible;margin-bottom: 0px;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">作为一名有超过15年经验，发表过150多篇同行评议论文的环境科学家，笔者对学术出版的起起落落非常熟悉。但上个月，笔者收到了一家著名国际期刊的拒稿决定，其中有一些明显的奇怪之处。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">在最初的主要修改决定之后，笔者们仔细地处理了每个审稿人的关注点，并提交了一份彻底修改过的手稿。第一轮的评议是合理的，作者们进行了详细的回应，进一步提高了工作的清晰度和科学严谨性。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">然而，论文最终被拒绝了，主要是因为一位审稿人出人意料地在第二轮报告中给出了负面评价。</span><span style="color: rgb(95, 156, 239);box-sizing: border-box;visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">困扰作者的不仅是审稿人的语气，而是他批评的性质：审稿人提出了以前从未提出过的全新问题。这些评论是公式化的，模糊的，经常是不相关的，偶尔是不准确的，与作者们手稿的实际内容几乎没有关系</span></span><span leaf="" style="visibility: visible;margin-bottom: 0px;">。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">诸如“more needed”和“needs to be validated”之类的评论缺乏技术依据或基于数据的反馈。作者的研究是在环境化学领域，侧重于一种新的环境分析方法的现场应用。然而，审稿人批评它未能提供“全面的生态评估”，并且“没有检查对动物行为的影响，比如喂养或交配”——就好像它是一篇行为生态学论文一样。审稿人还声称，“化学分析的可重复性没有得到充分解释”，尽管这在多个部分都得到了解决。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">此外，通篇审稿意见甚至有些自相矛盾。它首先承认“作者回答了提出的问题”，但随后在没有连贯推理的情况下得出结论，“我不能推荐这项工作。”</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">在那一刻，作者开始怀疑这篇评论是由ChatGPT等人工智能工具撰写的，至少部分是由ChatGPT等人工智能工具撰写的。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">作为一名环境科学期刊的副主编，作者发现越来越多的评论似乎是由人工智能撰写的——尽管这一点很少事先披露。他们通常表面上听起来很清晰，但缺乏深度、背景和专业责任感。具体来说，根据笔者的经验，人工智能生成的评论通常有五个关键弱点：</span></p><ol style="list-style-type: decimal;visibility: visible;margin-bottom: 0px;" class="list-paddingleft-1"><li style="visibility: visible;margin-bottom: 0px;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-weight: bold;">依赖于模糊的、过于笼统的语言。</span></span></p></li><li style="visibility: visible;margin-bottom: 0px;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-weight: bold;">通过抽象的批评歪曲了论文的范围。</span></span></p></li><li style="visibility: visible;margin-bottom: 0px;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-weight: bold;">标记已经解决的问题。</span></span></p></li><li style="visibility: visible;margin-bottom: 0px;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-weight: bold;">表现出不一致或矛盾的逻辑。</span></span></p></li><li style="visibility: visible;margin-bottom: 0px;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-weight: bold;">缺乏一个深思熟虑的人类评论者的语气、同理心或细微差别。</span></span></p></li></ol><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">为了证实作者的怀疑，作者将审稿人的评论与作者用大型语言模型生成的样本审查进行了比较。这种相似性是惊人的。措辞，再一次，是模板和脱离作者们的手稿的实际内容。而且，这篇评论再一次包含了关键词驱动的总结、毫无根据的断言和有缺陷的推理。感觉不太像是深思熟虑的同行评议，而更像是自动回复。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><span leaf="" style="margin-bottom: 0px;">作为一名编辑，笔者也知道招募合格的审稿人是多么困难。许多专家负担过重，使用人工智能工具加速这一过程的诱惑越来越大。但是，肤浅的逻辑不能代替科学的判断。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><span leaf="" style="margin-bottom: 0px;">因此，作者向杂志主编提出了担忧，并提供了详细的反驳和支持证据。编辑礼貌而谨慎地回答说：“审稿人极不可能使用人工智能。”“如果你能解决所有问题，我建议你重新提交一份新手稿。”</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><span leaf="" style="margin-bottom: 0px;">经过三个月的修改和回应，作者们又回到了起跑线上！！！这一决定——以及它受到人工智能不当使用影响的可能性——让作者深感失望。有些人可能会认为这是运气不好，但科学不应该依赖运气。同行评议必须以公平、透明和专业为基础。</span><span style="color: rgb(95, 156, 239);box-sizing: border-box;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">这并不是呼吁完全禁止人工智能参与同行评审过程。这些工具可以帮助审稿人和编辑识别不一致，发现剽窃或改进演示</span></span><span leaf="" style="margin-bottom: 0px;">。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><span leaf="" style="margin-bottom: 0px;">然而，使用它们来产生完整的同行评审可能会破坏该过程的真正目的。它们的使用必须是透明的，严格是次要的。审稿人不应该不加批判地依赖人工智能生成的文本，编辑必须学会识别缺乏实质内容或连贯性的审稿。出版商也有责任开发检测人工智能生成内容的机制，并制定明确的披露政策。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><span leaf="" style="margin-bottom: 0px;">《自然》杂志6月16日宣布，它将开始将所有同行评议意见和作者回复与已接受的论文一起发表，</span><span style="color: rgb(95, 156, 239);box-sizing: border-box;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">这是出版商恢复透明度和问责制的一条潜在途径</span></span><span leaf="" style="margin-bottom: 0px;">。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><span leaf="" style="margin-bottom: 0px;">科学和出版必须随着技术的进步而进步，但不能没有责任。透明、以人为本的同行评议仍然至关重要。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><span leaf="" style="margin-bottom: 0px;">参考文献：</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;"><span leaf="" style="margin-bottom: 0px;"><a href="https://www.timeshighereducation.com/opinion/my-paper-was-probably-reviewed-ai-and-thats-serious-problem" target="_blank">https://www.timeshighereducation.com/opinion/my-paper-was-probably-reviewed-ai-and-thats-serious-problem</a></span></p></div></div></div></div></div><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247526279">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=9970dc5b&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526279%26idx%3D3%26sn%3Db07228752a77d8bf86711a99c18a1b87">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Wed, 13 Aug 2025 20:05:00 +0800</pubDate>
    </item>
    <item>
      <title>确定！知名高校裁员363人！明天可能就是你的母校：高校裁员海啸地图曝光！</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526266&amp;idx=1&amp;sn=1e3f7f6bda5c7cbe17ff49d559439003</link>
      <description>裁员的风，还是正式开始刮了。</description>
      <content:encoded><![CDATA[<p>
<span></span> <span>2025-08-12 14:38</span> <span style="display: inline-block;">浙江</span>
</p>

<p>裁员的风，还是正式开始刮了。</p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=ab69ec44&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2F87HjJEl4c1urCDnhtemib0vMo3bQEm09KBibJibP4ibJuWl5PAYYPs5d2ibm0OWp4icWeBeQO9sr72dz9CfpnFQwibdkA%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<div><div powered-by="xiumi.us"><div><p powered-by="xiumi.us"><span leaf="" style="color:rgba(0, 0, 0, 0.9);font-size:17px;font-family:&#34;mp-quote&#34;, &#34;PingFang SC&#34;, system-ui, -apple-system, BlinkMacSystemFont, &#34;Helvetica Neue&#34;, &#34;Hiragino Sans GB&#34;, &#34;Microsoft YaHei UI&#34;, &#34;Microsoft YaHei&#34;, Arial, sans-serif;line-height:1.6;letter-spacing:0.034em;font-style:normal;font-weight:normal;"><span textstyle="" style="font-size: 14px;">来源| 募格学术、新华社客户端、央视新闻客户端、青塔、软科、麦可思研究等</span></span></p></div></div></div><p style="line-height: 1.75em;margin: 0px 16px;visibility: visible;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">裁员的风，还是正式开始刮了。</span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;visibility: visible;"><span style="visibility: visible;margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">当地时间8月5日，美国斯坦福大学表示，特朗普政府削减了对高校的联邦资助，</span></span></span><span style="visibility: visible;margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;color: rgb(171, 25, 66);font-weight: bold;">多个院系裁员，共计裁撤363人。</span></span></span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;visibility: visible;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">据报道，这一举措影响了斯坦福大学各个部门的工作，包括行政、研究、校友关系和校园运营。</span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;visibility: visible;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">学校官员在7月31日的一份声明中说：</span><span textstyle="" style="font-size: 15px;letter-spacing: normal;color: rgb(171, 25, 66);font-weight: bold;">“学校正在为符合条件的员工提供支持资源和裁员福利。</span><span textstyle="" style="font-size: 15px;letter-spacing: normal;">尽管如此，这些艰难的举动会影响到为斯坦福做出重要贡献的重要同事和朋友。”</span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;visibility: visible;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">斯坦福大学负责人力资源的副校长伊丽莎白·扎卡里亚斯在一封信中说，此次裁员是由于“持续的经济不确定性”和“联邦政策的预期变化——比如联邦研究经费的减少和投资收入消费税的增加”。</span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;visibility: visible;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">美国总统特朗普上个月签署的“大而美法案”将斯坦福大学的捐赠税从1.4%提高到21%。斯坦福大学376亿美元的捐赠基金是美国最大的捐赠基金之一。</span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;visibility: visible;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">斯坦福大学还失去了大量的联邦研究资金，因为美国国立卫生研究院和国家科学基金会等机构受到持续资金冻结的影响。</span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;visibility: visible;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">根据该校校长和教务长6月份的一份声明，斯坦福大学还被迫在即将到来的一年削减1.4亿美元的一般预算。学校官员引用了“联邦政策变化带来的重大预算后果”。</span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;visibility: visible;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">“这些变化包括联邦研究支持的减少和捐赠税的增加。”声明写道。</span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><br/></span></p><p mpa-from-tpl="t" style="line-height: 1.75em;margin: 0px 16px;text-align: center;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="letter-spacing: normal;color: rgb(214, 168, 65);font-weight: bold;">“裁员”，成英美高校高频词</span></span></span></p><p mpa-paragraph-type="body" style="line-height: 1.75em;margin: 0px 16px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">就在过去短短一个月，</span><span textstyle="" style="font-size: 15px;letter-spacing: normal;color: rgb(171, 25, 66);font-weight: bold;">全美已经有数十家大学和研究机构限制对博士后、科研助理及教职员工招聘。</span><span textstyle="" style="font-size: 15px;letter-spacing: normal;">3月7日，</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">哥伦比亚大学</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">被美国政府撤回4亿美元拨款。3月10日，</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">哈佛大学</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">校长Alan Garber发出公开信，宣布即日起暂停全校教职员工招聘。2月，</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">宾夕法尼亚大学</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">宣布削减35%的研究生招生，</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">南加州大学</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">宣布暂停部分博士生项目的招生，</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">斯坦福大学</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">则暂停了学校新员工招聘。</span></span></span></p><p mpa-paragraph-type="body" style="line-height: 1.75em;margin: 0px 16px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">在更早些时候，美国顶尖医学院</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">俄勒冈健康与科学大学</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">宣布将裁员至少500人，并大幅削减员工福利，以减缓财政压力。</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">芝加哥哥伦比亚学院、帕克大学</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">等高校纷纷加入裁员“大潮”。</span></span></span></p><p mpa-paragraph-type="body" style="line-height: 1.75em;margin: 0px 16px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">在英国，高校裁员局势亦严峻。2024年11月，英国高等教育行业领导者曾预测：到2024年末，英国140多所大学中将有超100所大学裁员，裁掉的教职员工预计达10000人。这一规模被形容为英国高等教育领域的“灾难性”局面。</span></span></span></p><p mpa-paragraph-type="body" style="line-height: 1.75em;margin: 0px 16px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">今年1月，</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">杜伦大学</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">计划在本学年削减1000万英镑的员工成本，称预计裁掉</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">200个</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">工作岗位，不排除强制裁员的可能。</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">纽卡斯尔大学</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">也宣布，计划裁减</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">300个</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">全职等同职位。</span></span></span></p><p mpa-paragraph-type="body" style="line-height: 1.75em;margin: 0px 16px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">同月，据英国广播公司（BBC）报道，</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">卡迪夫大学</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">由于资金短缺，计划削减400个全职工作岗位。削减提案还涉及课程关闭和院系合并，其中护理、音乐、现代语言、古代历史、宗教和神学等学科和课程将面临削减。</span></span></span></p><p mpa-paragraph-type="body" style="line-height: 1.75em;margin: 0px 16px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;color: rgb(171, 25, 66);font-weight: bold;">不少英国高校相继提出教职工“自愿离职计划”。</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">贝尔法斯特女王大学</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">在2月成为最新一所启动自愿离职计划的英国高等教育机构，工会警告说，将有270个工作岗位被取消。</span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><br/></span></p><p style="line-height: 1.75em;margin: 0px 16px;text-align: center;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="letter-spacing: normal;color: rgb(214, 168, 65);font-weight: bold;">视线转回国内</span></span></p><p style="line-height: 1.75em;margin: 0px 16px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">视线回到国内。反观中国高校，行政精简的探索早已展开。</span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;"><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">内江职业技术学院</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">2024年果断缩减行政机构9个、减少行政人员49名；2024年4月，</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">东</span></span></span></strong><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">北大学工商管理学院</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">召开行政机构优化动员部署会，强调要优化学院行政机构，将现行的13个部门整合精简为5个部门；</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">无锡城市职业技术学院</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">2022年发布关于该校整改情况的通报提到，梳理全校各学院（部）、各部门的现状及亟需解决的问题，下一步的举措包括</span></span></span><strong style="margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">“</span></span></span></strong></strong><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">精简行政部门人员编制”</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">；2015年，</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">复旦大学</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">对机关科室编制进行“瘦身”，校院两级管理人员比例从超过2∶1变为1∶1，不少行政人员被“下放”到基层院系；2009年新学期开学后，</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">武汉科技大学中南分校（现更名为武昌理工学院</span></span></span></strong><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">）</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">宣布实施“大部制”改革，改革后，20多个行政部门经合并和合署办公后精简为10个；</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">广州大学</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">在2004年就率先开启了行政人员精简之路，将当时428名机关行政人员压缩至300人（不含校领导、协理员、挂职人员）。</span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">《现代大学治理体系视域下高校行政机构改革创新路径探究》一文中指出，通过对37所一流大学建设高校2012—2016年间行政人员数量的对比发现，</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">约35%的高校行政人员数年增长率为负。</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">这一数据充分表明，在这一时期，相当一部分中国高校已经敏锐地意识到行政人员规模优化的重要性，并采取了相应措施来控制行政人员数量的增长。</span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><br/></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin: 0px 16px;"><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-imgfileid="505708904" data-ratio="0.4566787003610108" style="padding: 0px;outline: 0px;max-width: 100%;vertical-align: baseline;font-family: inherit;box-shadow: rgb(150, 150, 150) 0px 0px 14px 0px;margin-bottom: 0px;box-sizing: border-box !important;overflow-wrap: break-word !important;visibility: visible !important;width: 554.006px !important;height: auto;" data-type="png" data-w="554" src="https://wechat2rss.xlab.app/img-proxy/?k=abbb19df&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2FVHyIFFPfLohaN4pR0JBuwib4byVCMoHhhpsCs0Vsk8sBKVPGI7ia1PbjHX5HvYsX8xrsAvl38qXHb0Gl9Koibibebw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26wxfrom%3D5%26wx_lazy%3D1%26tp%3Dwebp"/></p><p style="line-height: 1.75em;margin: 0px 16px;text-align: center;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 14px;letter-spacing: normal;color: rgb(136, 136, 136);font-weight: bold;">图片来源：《现代大学治理体系视域下高校行政机构改革创新路径探究》</span></span></span></p><div style="margin-bottom: 24px;"><div style="margin-bottom: 0px;"><p style="line-height: 1.75em;margin: 0px 16px;text-align: center;"><strong style="margin-bottom: 0px;"><span style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="letter-spacing: normal;color: rgb(214, 168, 65);font-weight: bold;">减员增效，敲响警钟</span></span></span></strong></p></div></div><p style="line-height: 1.75em;margin: 0px 16px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">今年2月，某师范大学曾发布一则通知，其中提到“严格控制新进人员规模，清理整治富余闲散人员，对懒政、怠政、庸政人员调离机关工作岗位……</span><span textstyle="" style="font-size: 15px;letter-spacing: normal;color: rgb(171, 25, 66);font-weight: bold;">除缺编严重的部门外，机关各部门原则上不得使用编外聘用人员，</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;color: rgb(171, 25, 66);font-weight: bold;">现有编外聘用人员存量要通过自然减员、调剂等方式逐步压缩”</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;color: rgb(171, 25, 66);font-weight: bold;">。</span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><br/></span></p><p style="line-height: 1.75em;margin: 0px 16px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">如今幼儿园正在经历的首轮关停潮，在“多米诺骨牌效应”下，最终会在15年后蔓延至大学，</span></span></span><strong style="margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">届时或将有170多所高校面临倒闭危机</span></span></span></strong><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">。</span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><br/></span></p><p style="line-height: 1.75em;margin: 0px 16px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">正如中国教育科学研究院研究员储朝晖所说，“我国高等教育逐步到达普及状态，未来对高校学位的总体需求将减少，对于不少学校而言，生源危机将逐步来临，</span><span textstyle="" style="font-size: 15px;letter-spacing: normal;color: rgb(171, 25, 66);font-weight: bold;">部分高校未来将面临被撤销的命运”。</span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><br/></span></p><p style="line-height: 1.75em;margin: 0px 16px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">而在很多方面，大学的关闭就像企业清算一样：员工拿到遣散费，资产被出售，顾客被告知另寻别处。</span></span></span></p><p style="line-height: 1.75em;margin: 0px 16px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><br/></span></p><p style="line-height: 1.75em;margin: 0px 16px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">对于教师来说，高校的撤并无疑只是一个开始——随着学生减少，冗余的教师是否会被迫遣散？离开高校之后的教师，又该如何安置？</span></span></span></p><p style="margin-bottom: 0px;line-height: 1.75em;"><strong style="margin-bottom: 0px;"><p style="line-height: 1.75em;margin: 0px 16px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: normal;">改变已经开始。对于高校教职人员来说，能做的或许也只有未雨绸缪，做好相应的准备，以迎接未来的不确定性。</span></span></span></p><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p><p style="line-height: 1.75em;margin: 0px 16px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><br/></span></span></p></strong></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247526266">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=71bdfec5&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526266%26idx%3D1%26sn%3D1e3f7f6bda5c7cbe17ff49d559439003">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Tue, 12 Aug 2025 14:38:00 +0800</pubDate>
    </item>
    <item>
      <title>【Python】说实话，统计分析用Python这5个第三方库就够了，不比spss差</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526266&amp;idx=2&amp;sn=cd392d23e43d908160013975d3c3c39a</link>
      <description>知乎上有人问，有没有一款全面的、容易上手的数据统计分析软件？看到不少回答推荐spss、stata、matla</description>
      <content:encoded><![CDATA[<p>
<span>Python大数据分析</span> <span>2025-08-12 14:38</span> <span style="display: inline-block;">浙江</span>
</p>




<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=f6dd1406&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2Fg64sbb6FfmdCVL98ICg6BIibKicibLdKpPbEiabA2YutibcRnTZllhudz6Zp3DIP0XWhsx2FmkZWyy9J6mpjVkgpWsw%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<div data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 10px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: linear-gradient(90deg, rgba(50, 0, 0, 0.05) 3%, rgba(0, 0, 0, 0) 3%), linear-gradient(360deg, rgba(50, 0, 0, 0.05) 3%, rgba(0, 0, 0, 0) 3%);background-origin: padding-box;background-repeat: no-repeat;background-size: 20px 20px;width: auto;font-family: Optima-Regular, ptima-Regular, ptima-Regular, ptima-Regular, ptima-Regular;font-size: 16px;color: rgb(89, 89, 89);line-height: 1.75;word-spacing: 0em;letter-spacing: 2px;word-break: break-word;overflow-wrap: break-word;text-align: left;background-position-x: center;background-position-y: center;" data-pm-slice="0 0 []"><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">知乎上有人问，有没有一款全面的、容易上手的数据统计分析软件？</span></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img data-imgfileid="511601148" class="rich_pages wxw-img" data-ratio="0.28888888888888886" data-type="png" data-w="1080" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" src="https://wechat2rss.xlab.app/img-proxy/?k=adc8ac2d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6FfmdCVL98ICg6BIibKicibLdKpPbU906sLtdbdiaIont82hvQD56ancicnuooGdfvN2MpAqYhlKicUCBibTETw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">看到不少回答推荐spss、stata、matlab这类分析软件，但我想说的是， 如果你懂编程，那一定要尝试python数据分析5大专业库，包括pandas、numpy、statsmodels、sklearn、matplotlib，几乎能解决所有数理统计分析的问题，可以读取和导出所有主流格式文件，而且计算效率非常高，我理解会比spss、stata之类的软件效率高很多。</span></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img data-imgfileid="511601149" class="rich_pages wxw-img" data-ratio="0.6064814814814815" data-type="png" data-w="1080" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" src="https://wechat2rss.xlab.app/img-proxy/?k=0679275a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6FfmdCVL98ICg6BIibKicibLdKpPbKvxrwHnicY35y6jSISMutfyjqWmG2x7iamP3kQiclDoeWruHSg5o3oVuQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">这几个库分别有什么作用呢？它们分工很明确，在各自领域都是名声大噪。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">pandas专门负责数据处理，基于直观的二维数据表，配备了上千种的数据处理api，可以实现数据导入、导出、清洗、转换、透视、可视化等各种功能，堪称编程界的Excel。kaggle这样的比赛也都把pandas作为数据处理的核心工具。<img class="rich_pages wxw-img" data-imgfileid="511601145" data-ratio="0.5616605616605617" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-type="png" data-w="819" src="https://wechat2rss.xlab.app/img-proxy/?k=c4ea0c7d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6FfmdCVL98ICg6BIibKicibLdKpPbDAo4wiaFHnCO9VWk2CVBlA7BuNJXevu1d49QYLkeZPcuZTLzsRNfAzQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">numpy是基于数组计算的底层科学计算库，它加速了python的计算能力，很多数据分析库都是基于numpy来实现计算的。numpy有n 维数对象array，而且有丰富的广播函数，能实现线性代数、傅里叶变换等复杂的数学计算。现在主流的AI 建模工具都是在numpy 基础上开发的，跑算法的能力一流。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf=""><img data-imgfileid="511601146" class="rich_pages wxw-img" data-ratio="0.562429696287964" data-type="png" data-w="889" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-left-radius: 6px;border-top-right-radius: 6px;border-bottom-right-radius: 6px;border-bottom-left-radius: 6px;object-fit: contain;" src="https://wechat2rss.xlab.app/img-proxy/?k=8f6084ac&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6FfmdCVL98ICg6BIibKicibLdKpPbicf2Yq0b6nEufIjiaiaNeic5ibFcwVVS9vD5ibGkic9J44fKEr6BQpm4eyfIQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/>statsmodels是专门用于统计建模的库，包括各种统计模型的拟合、检验和数据探索的工具，还有丰富的统计推断工具（如 p 值、置信区间）和计量经济学模型，强调模型的解释性和严谨性。对于统计工作来说，statsmodels是绕不开的一个库，spss 有的它都会有。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf=""><img data-imgfileid="511601147" class="rich_pages wxw-img" data-ratio="0.7712962962962963" data-type="png" data-w="1080" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-left-radius: 6px;border-top-right-radius: 6px;border-bottom-right-radius: 6px;border-bottom-left-radius: 6px;object-fit: contain;" src="https://wechat2rss.xlab.app/img-proxy/?k=fd3ba9b3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6FfmdCVL98ICg6BIibKicibLdKpPbwF6JcmG9klhkML8shtP998XwJ8nn3upmgrx80LnF7v1ClWRLtHf7CQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/>sklearn 则是用于开发机器学习模型的库，它也是kaggle 比赛里高频出现的工具，因为它集中了分类、预测、聚类等几乎所有机器学习模型，而且调用方法很简单，适合作为日常建模主机工具。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf=""><img data-imgfileid="511601151" class="rich_pages wxw-img" data-ratio="0.6234413965087282" data-type="png" data-w="802" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-left-radius: 6px;border-top-right-radius: 6px;border-bottom-right-radius: 6px;border-bottom-left-radius: 6px;object-fit: contain;" src="https://wechat2rss.xlab.app/img-proxy/?k=a0d670e0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6FfmdCVL98ICg6BIibKicibLdKpPbqsoQS6HPOYRsujzlOXgevtFLtckSiatmmichDibV8SzQicGMu0dhNrT7jw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/>matplotlib是Python中最底层的绘图库，它支持二维、三维、交互式等各种图表，而且通过元素化的模式能设计图表的任何细节，定制化程度非常高，很多可视化库都是基于matplotlib做二次开发的，或者是matplotlib的拓展，比如seaborn、pandas、mplfinance、DNA Features Viewer等，它们能应用于数据科学、金融量化、生物医学等各领域科研绘图。<img data-imgfileid="511601153" alt="在这里插入图片描述" class="rich_pages wxw-img" data-ratio="0.8492569002123143" data-type="png" data-w="942" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-left-radius: 6px;border-top-right-radius: 6px;border-bottom-right-radius: 6px;border-bottom-left-radius: 6px;object-fit: contain;" src="https://wechat2rss.xlab.app/img-proxy/?k=2b45e1ad&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6FfmdCVL98ICg6BIibKicibLdKpPbD8VnNfpKc1ARZUN5m5m50iaeQpJtT5t37EfnmDmicYAorEic6O5FPGsibg%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/>另外如果你觉得matplotlib 绘图太麻烦，可以用seaborn，它是专门用于统计绘图的库，非常美观。</span></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img data-imgfileid="511601150" class="rich_pages wxw-img" data-ratio="0.7558139534883721" data-type="png" data-w="258" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" src="https://wechat2rss.xlab.app/img-proxy/?k=8f1872a0&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6FfmdCVL98ICg6BIibKicibLdKpPbj6ktZV7SEOUpXnAxu0lJEPpYtMWeicJZkSyibicLHq9zX9fpTvDVcdxAQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">这 5 个库不是相互独立的，它们很多api 能直接交互，比如pandas 的数据能直接在matplotlib 中展示，sklearn 训练模型可以交给numpy 来加速，它们在一起就能搞定所有统计数据分析。</span></p><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p></div><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247526266">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=566eef7c&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526266%26idx%3D2%26sn%3Dcd392d23e43d908160013975d3c3c39a">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Tue, 12 Aug 2025 14:38:00 +0800</pubDate>
    </item>
    <item>
      <title>41个榜单SOTA！智谱最新开源GLM-4.5V实测：看图猜地址、视频秒变代码</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526266&amp;idx=3&amp;sn=6807575d4fd08be14e2e547828a40031</link>
      <description>智谱乘胜追击，开源全新多模态模型</description>
      <content:encoded><![CDATA[<p>
<span></span> <span>2025-08-12 14:38</span> <span style="display: inline-block;">浙江</span>
</p>

<p>智谱乘胜追击，开源全新多模态模型</p>



<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=6254267c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2F87HjJEl4c1urCDnhtemib0vMo3bQEm09KVcibU3gZ72wNoXvQ2FCziajppUFWACst3icF7gJkqVI5w7GyL8Hk5d09Q%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<h3 data-mpa-powered-by="yiban.io" style="outline: 0px;color: rgb(34, 34, 34);letter-spacing: 0.544px;font-family: -apple-system-font, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;background-color: rgb(255, 255, 255);visibility: visible;margin-bottom: 0px;"><div data-tools="135编辑器" data-id="88402" style="outline: 0px;line-height: 27.2px;widows: 1;visibility: visible;margin-bottom: 0px;"><div data-tools="135编辑器" data-id="88402" style="outline: 0px;letter-spacing: 0.544px;line-height: 27.2px;visibility: visible;margin-bottom: 0px;"><div data-style="line-height: 1.8; text-align: justify; font-size: 15px; letter-spacing: 0px; color: rgb(117, 114, 114);white-space: normal;" style="outline: 0px;visibility: visible;margin-bottom: 0px;"><div style="outline: 0px;visibility: visible;margin-bottom: 0px;"><p style="margin-bottom: 8px;text-align: center;visibility: visible;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">来源：新智元    编辑：定慧</span></p></div></div></div></div></h3><div powered-by="xiumi.us" style="margin-bottom: 0px;outline: 0px;color: rgb(34, 34, 34);letter-spacing: 0.544px;font-family: -apple-system-font, system-ui, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;background-color: rgb(255, 255, 255);visibility: visible;"><div style="outline: 0px;visibility: visible;margin-bottom: 0px;"><p style="outline: 0px;visibility: visible;margin-bottom: 0px;"><h5 style="margin: 10px 8px 0px;padding: 10px;font-size: 14px;outline: 0px;color: rgb(0, 0, 0);letter-spacing: 0.544px;font-family: Arial, Helvetica, sans-serif;border-radius: 3px;background-color: rgb(248, 248, 248);line-height: 1.75em;visibility: visible;word-break: break-all !important;word-spacing: 1px !important;"><span style="outline: 0px;letter-spacing: 1px;font-size: 15px;visibility: visible;margin-bottom: 0px;"><strong style="outline: 0px;visibility: visible;margin-bottom: 0px;"><span leaf="" style="visibility: visible;margin-bottom: 0px;">【导读】</span><span leaf="" style="visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-weight: normal;">智谱基于GLM-4.5打造的开源多模态视觉推理模型GLM-4.5V，在42个公开榜单中41项夺得SOTA！其功能涵盖图像、视频、文档理解、Grounding、地图定位、空间关系推理、UI转Code等。</span></span></strong></span></h5></p></div></div><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;visibility: visible;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">这半年，</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">多模态大模型</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">已经成为各家的标配，但似乎</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">功能都有点趋同</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，玩起来都有点腻了。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;visibility: visible;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">不过，今晚智谱最新开源的</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 104, 39);font-weight: bold;">GLM-4.5V视觉推理模型</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，带来了非常多的惊喜！</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;visibility: visible;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">两周前，智谱发布</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">GLM-4.5</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，这个融合ARC（Agentic、Reasoning、Coding）能力的模型获得非常高的关注。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;visibility: visible;margin-bottom: 24px;"><strong style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">取得了</span></span></strong><strong style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">全球模型第三、国产模型第一，开源模型第一的成绩！</span></span></strong></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;visibility: visible;margin-bottom: 24px;"><strong style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">智谱这次乘胜追击！在GLM-4.5基座之上进一步训练出</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 104, 39);font-weight: bold;">100B级别最强开源多模态模型</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，成功在多模态赛道上占据一席之地。</span></span></strong></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;visibility: visible;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">GLM-4.5V</span></span><strong style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">「看懂世界」</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">的方式，</span></span><strong style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">是真的有点东西</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，而且在智谱最近新推出的</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">z.ai</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">的平台上，</span></span><strong style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">升级了很多</span></span></strong><strong style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">视觉多模态的</span></span></strong><strong style="visibility: visible;margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 104, 39);font-weight: bold;">全新玩法</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">。</span></span></strong></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;visibility: visible;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">比如这次更新后，GLM-4.5V可以玩看图猜地址GeoGuessr游戏，而且准确率非常高。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;visibility: visible;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">我们试了三次，每次的国家和大洲都非常准确，不过具体经纬度可能还需抽卡。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;visibility: visible;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;visibility: visible;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">下面是其中一次测试，GLM-4.5V可以找到画面中的关键元素，配合地理风格、建筑风格等来推理出正确结论。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;visibility: visible;margin-bottom: 24px;"><img data-imgfileid="505135298" alt="图片" class="rich_pages wxw-img" data-ratio="0.1648148148148148" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;visibility: visible !important;" data-width="1662" data-height="274" data-backw="562" data-backh="93" src="https://wechat2rss.xlab.app/img-proxy/?k=e7175198&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXjBco2jpWicWMicvTtWZCzxJX7sSYicoI1pbWx8PxtCDgq0dibBOf2ujtyA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img data-imgfileid="505135295" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.26944444444444443" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-width="1982" data-height="534" data-backw="562" data-backh="151" src="https://wechat2rss.xlab.app/img-proxy/?k=b6e174af&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXZtOGYibbdSG1Yr9RndeJj6m5t8QTMwCuZy1TvzgeTjHicOib4KyrQRB8w%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img data-imgfileid="505135297" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.43703703703703706" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-width="1594" data-height="696" data-backw="562" data-backh="246" src="https://wechat2rss.xlab.app/img-proxy/?k=097525a6&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXibIJl1UicUIv636ibkRw4qUgC6SS0K0cHXYhz1NMqXLr56C5kUwPH4b6g%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">值得一提的是，智谱还派出GLM-4.5V参加了国内的</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 104, 39);font-weight: bold;">图寻游戏挑战</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，和国内最顶尖的两万多名人类玩家真实对战。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img data-imgfileid="505135296" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.37592592592592594" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-width="2602" data-height="978" data-backw="562" data-backh="211" src="https://wechat2rss.xlab.app/img-proxy/?k=82f18b9f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXF5pIbGssZDhfkBrAsbMjAmLQ9JYKtOJADpTBrMOSWPibVhzETYpdZ2w%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">目前</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">智谱已经在全球排名66</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，而其他都是人类选手。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-backh="183" data-backw="562" data-height="1038" data-imgfileid="505135299" data-ratio="0.325" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-type="png" data-w="1080" data-width="3192" src="https://wechat2rss.xlab.app/img-proxy/?k=a358e653&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXeOCPCxq9dQRS9icwHew9SLvpJF5ibntYwJhlicJCldd1Mic8x7iaembfMsQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">智谱这次更新的另一个玩法就是</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 104, 39);font-weight: bold;">Grounding能力</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，GLM-4.5V眼神太好，可以在清明上河图中找到</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">三匹马</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">（左上角角落），并在图中做出标识。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-backh="308" data-backw="562" data-height="908" data-imgfileid="505135300" data-ratio="0.5472222222222223" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-type="png" data-w="1080" data-width="1658" src="https://wechat2rss.xlab.app/img-proxy/?k=471f3507&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXiacLxAMCEGojgmtPU3SRl1DNFQ6KOCooGkLkZKSnPyqibKRN3WDUliaBw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">GLM-4.5</span></span><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">V</span></span><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">不仅</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">眼神好</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，还能理解视频，</span></span><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">而</span></span><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">代码能力</span></span><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">又</span></span><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">沿袭了它的基座模型GLM-4.5</span></span><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，两者相加</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">「涌现」出一种</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 104, 39);font-weight: bold;">全新能力</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">那就是，通过</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">直接上传视频也能复刻网站！</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">神奇之处在于，GLM-4.5V</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">完全没有训练过</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">「看视频」前端网页复刻，这个意外发现体现了GLM-4.5很强的泛化能力。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">我们录了一个Github的网站视频。</span></span></p><p nodeleaf="" style="margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">GLM-4.5V竟然也可以复刻个七七八八。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img data-imgfileid="505135305" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.5611111111111111" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-width="2718" data-height="1524" data-backw="562" data-backh="315" src="https://wechat2rss.xlab.app/img-proxy/?k=b4767b3f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXeJttZy5Q3xlyyvcZwvpXiaIDSTXtQt0Lg48se60jQtiaqGicJSfQHM6Cw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">下图左边是原版，右边是复刻，大体框架没有问题，有个别按钮的位置，以及时间线组件被修改为列表等小问题。</span></span></p><p style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;" nodeleaf=""><img data-imgfileid="505135357" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.2537037037037037" data-s="300,640" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" type="block" data-backw="562" data-backh="143" src="https://wechat2rss.xlab.app/img-proxy/?k=33b47499&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcX4HmRydOb1Zk84C5oVCE5mtm5zdLxdibaT9CaA6micvS2svDARWPuE7vg%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 48px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">在实测中，我们发现，不论是GeoGuessr看图挑战、空间关系理解、复杂图表推理、OCR识别、做题，甚至可以理解视频等各个方面，GLM-4.5V的表现都远超预期。</span></span></p><p style="text-align: center;margin: 0px 8px;" nodeleaf=""><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-imgfileid="505095291" data-ratio="0.5267857142857143" data-s="300,640" style="margin-bottom: 0px;width: 85px !important;height: auto;" data-type="png" data-w="112" src="https://wechat2rss.xlab.app/img-proxy/?k=a806d890&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb3uEdSPKrwGNmZEOaaGyzVvZ8dTtE9jU1rFsda3llYbCZpmWfiazUYjWBLTGvlPpXucH8Q0lEUJN3Q%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></p><p style="text-align: center;margin: 8px 8px 24px;line-height: 1.75em;"><span style="color: rgb(0, 0, 0);font-size: 19px;letter-spacing: 1px;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">GLM-4.5V一手实测</span></strong></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">GLM-4.5V</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">基于智谱发布的新一代旗舰文本基座模型</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">GLM-4.5-Air</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，沿用了</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">GLM-4.1V-Thinking</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">的结构。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">其中，GLM-4.1V-Thinking 7月上线后就登上了HuggingFace Trending第一，模型已获得累计超过13万次下载。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-backh="187" data-backw="562" data-height="600" data-imgfileid="505135311" data-ratio="0.3333333333333333" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-type="png" data-w="1080" data-width="1800" src="https://wechat2rss.xlab.app/img-proxy/?k=67e50e4b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXhhu9zWrMNROTr2NH3r9240DTP2PghAyicZPicfiaByj7Ehibke3MsZtzJQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><div style="line-height: 1.75;letter-spacing: 1px;word-break: break-word;color: rgb(91, 91, 91);border-left: 8px solid rgba(158, 158, 158, 0.3);border-radius: 5px;background: rgba(158, 158, 158, 0.1);padding-top: 24px;padding-bottom: 24px;padding-right: 8px;margin-top: 0px;margin-bottom: 0px;"><p style="font-size: 15px;margin: 0px 8px;padding-left: 8px;padding-right: 8px;line-height: 1.75em;letter-spacing: 1px;text-align: left;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-weight: bold;">Github：</span></span></p><p style="font-size: 15px;margin: 0px 8px;padding-left: 8px;padding-right: 8px;line-height: 1.75em;letter-spacing: 1px;text-align: left;"><span leaf="" style="margin-bottom: 0px;"><a href="https://github.com/zai-org/GLM-V " target="_blank">https://github.com/zai-org/GLM-V </a></span></p><p style="font-size: 15px;margin: 0px 8px;padding-left: 8px;padding-right: 8px;line-height: 1.75em;letter-spacing: 1px;text-align: left;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-weight: bold;">Hugging Face：</span></span></p><p style="font-size: 15px;margin: 0px 8px;padding-left: 8px;padding-right: 8px;line-height: 1.75em;letter-spacing: 1px;text-align: left;"><span leaf="" style="margin-bottom: 0px;"><a href="https://huggingface.co/collections/zai-org/glm-45v-68999032ddf8ecf7dcdbc102 " target="_blank">https://huggingface.co/collections/zai-org/glm-45v-68999032ddf8ecf7dcdbc102 </a></span></p><p style="font-size: 15px;margin: 0px 8px;padding-left: 8px;padding-right: 8px;line-height: 1.75em;letter-spacing: 1px;text-align: left;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-weight: bold;">魔搭社区：</span></span></p><p style="font-size: 15px;margin: 0px 8px;padding-left: 8px;padding-right: 8px;line-height: 1.75em;letter-spacing: 1px;text-align: left;"><span leaf="" style="margin-bottom: 0px;"><a href="https://modelscope.cn/collections/GLM-45V-8b471c8f97154e" target="_blank">https://modelscope.cn/collections/GLM-45V-8b471c8f97154e</a></span></p></div><p style="text-align: justify;margin: 24px 8px;line-height: 1.75em;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">GLM-4.1V-Thinking是一个小参数模型，而全新的GLM-4.5V拥有106B总参数，12B的激活参数。</span></span></strong></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">可以说，GLM-4.5V是100B参数这个「重量级」的SOTA标杆，现已经登录官网。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">GLM-4.5V</span></span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">实测了</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">42</span></span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">个公开视觉多模态榜单</span></span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，在其中</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 104, 39);font-weight: bold;">41个榜单</span></span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">中</span></span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，</span></span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">达到</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">同级别开源模型</span></span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">的</span></span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 104, 39);font-weight: bold;">SOTA</span></span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">性能</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，涵盖图像、视频、文档理解以及</span></span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">GUI</span></span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;"> Agent</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">等常见任务。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-backh="551" data-backw="562" data-height="5082" data-imgfileid="505135312" data-ratio="0.9796296296296296" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-type="png" data-w="1080" data-width="5188" src="https://wechat2rss.xlab.app/img-proxy/?k=4029b641&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXvQFlic4xcxdpGpHs5xXlJGibicnM5Uy9FM8yZsibd2mluM8T5VPO5WGQdA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">GLM-4.5V这次升级了很多玩法，实现全场景视觉推理覆盖，比如：</span></span></p><ul style="margin-left: 8px;margin-right: 8px;margin-bottom: 0px;" class="list-paddingleft-1"><li style="font-size: 15px;margin-bottom: 0px;"><p style="text-align: justify;line-height: 1.75em;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">图像推理</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">（场景理解、复杂多图分析、位置识别）</span></span></p></li><li style="font-size: 15px;margin-bottom: 0px;"><p style="text-align: justify;line-height: 1.75em;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">视频理解</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">（长视频分镜分析、事件识别）</span></span></p></li><li style="font-size: 15px;margin-bottom: 0px;"><p style="text-align: justify;line-height: 1.75em;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">GUI</span></span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">任务</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">（屏幕读取、图标识别、桌面操作辅助）</span></span></p></li><li style="font-size: 15px;margin-bottom: 0px;"><p style="text-align: justify;line-height: 1.75em;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">复杂图表与长文档解析</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">（研报分析、信息提取）</span></span></p></li><li style="font-size: 15px;margin-bottom: 0px;"><p style="text-align: justify;line-height: 1.75em;margin-bottom: 24px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">Grounding能力</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">（精准定位视觉元素）</span></span></p></li></ul><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">此次更新，模型新增</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">「思考模式」</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">开关</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，可以自行决定是否启用推理功能。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 0px;"><img data-imgfileid="505135308" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.26666666666666666" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-width="1610" data-height="430" data-backw="562" data-backh="150" src="https://wechat2rss.xlab.app/img-proxy/?k=c9963157&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXIh0D34LzQXhicISOYdlwxsKibPeQtklZO84EcTc4rZrYSZxE8hb6tuQg%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 13px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;" mpa-font-style="me765vhl1yia" data-mpa-action-id="me765vhx5pm"><span textstyle="" style="letter-spacing: 1px;color: rgb(136, 136, 136);font-weight: normal;">体验网站：<a href="https://chat.z.ai/" target="_blank">https://chat.z.ai/</a></span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">此外，继上次GLM-4.5「V50包月」活动，这次GLM-4.5V为企业与开发者提供高性价比的多模态AI解决方案：</span></span></p><ul style="margin-left: 8px;margin-right: 8px;margin-bottom: 0px;" class="list-paddingleft-1"><li style="font-size: 15px;margin-bottom: 0px;"><p style="text-align: justify;line-height: 1.75em;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">API</span></span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">调用价格</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">：低至输入2元/M tokens，输出6元/M tokens</span></span></p></li><li style="font-size: 15px;margin-bottom: 0px;"><p style="text-align: justify;line-height: 1.75em;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">响应速度</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">：达到60-80tokens/s</span></span></p></li><li style="font-size: 15px;margin-bottom: 0px;"><p style="text-align: justify;line-height: 1.75em;margin-bottom: 24px;"><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">API</span></span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;"> 接口文档</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">：<a href="http://docs.bigmodel.cn/api-reference" target="_blank">http://docs.bigmodel.cn/api-reference</a></span></span></p></li></ul><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">GLM-4.5V API现已上线智谱开放平台BigModel.cn，智谱为所有新老用户准备了2000万Tokens的免费资源包。</span></span></p><div style="line-height: 1.75;letter-spacing: 1px;word-break: break-word;color: rgb(91, 91, 91);border-left: 8px solid rgba(158, 158, 158, 0.3);border-radius: 5px;background: rgba(158, 158, 158, 0.1);padding-top: 24px;padding-bottom: 24px;padding-right: 8px;margin-top: 0px;margin-bottom: 0px;"><p style="font-size: 15px;margin: 0px 8px;padding-left: 8px;padding-right: 8px;line-height: 1.75em;letter-spacing: 1px;text-align: left;"><span leaf="" style="margin-bottom: 0px;"><span textstyle="" style="font-weight: bold;">领取链接：</span></span></p><p style="font-size: 15px;margin: 0px 8px;padding-left: 8px;padding-right: 8px;line-height: 1.75em;letter-spacing: 1px;text-align: left;"><span leaf="" style="margin-bottom: 0px;"><a href="https://zhipuaishengchan.datasink.sensorsdata.cn/t/bv" target="_blank">https://zhipuaishengchan.datasink.sensorsdata.cn/t/bv</a></span></p></div><div style="margin-bottom: 0px;"><p style="line-height: 1.75em;margin: 24px 8px 8px;"><strong style="letter-spacing: 0.578px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 17px;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><img data-imgfileid="505100592" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.25" data-s="300,640" data-type="png" data-w="292" style="margin-bottom: 0px;width: 81px !important;height: auto;" type="block" src="https://wechat2rss.xlab.app/img-proxy/?k=a1d4a63d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb351381bTy5MO2IN89mV41M88GEiaCCibDxJoaQjYV6HfRtafnmEmfM3R1p0tmkHgBOVuXBD6UJKpsQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/></span></strong></p></div><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 8px;margin-right: 8px;"><span style="letter-spacing: 1px;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">精准识别和定位目标物体</span></strong></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">GLM-4.5V能够从图片中理解并识别出具体的目标的物体。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">可以在界面上直接选择Grounding模式，传入图片和提示词即可。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img data-imgfileid="505135309" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.3490740740740741" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-width="1614" data-height="564" data-backw="562" data-backh="196" src="https://wechat2rss.xlab.app/img-proxy/?k=563e3278&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXlPQAibc0YvMosicPh5Jhwxh8Z8H6NBFHY4bY36AwcEB3yloFsU5LLnTQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">比如上传了一张AI随机生成的图片，GLM-4.5V的推理能力可以从图片中准确识别出「非现实」的物体，就是红框中看着像昆虫的洒水机器人。</span></span></p><p style="text-align: center;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;" nodeleaf=""><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-backh="171" data-backw="562" data-imgfileid="505135371" data-ratio="0.30462962962962964" data-s="300,640" type="block" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" src="https://wechat2rss.xlab.app/img-proxy/?k=d37ad641&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXZ1WUsctZYHTMsUsRXKiapAw24zeHOic9t8O5YzNCicJhiaD5DuuUgoEL9Q%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">简单介绍下</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">Grounding能力</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，在计算机视觉与多模态任务中，</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">Grounding能力</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">指的是模型将</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">自然语言中的词语或短语，精确地与图像中的具体区域或对象建立对应关系</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">的能力。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">它不仅要求模型能「看懂」图片，也能「读懂」文字，并在两者之间建立准确的</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">语义—视觉映射</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 0px;"><img data-imgfileid="505135313" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.625" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-width="1678" data-height="1048" data-backw="562" data-backh="351" src="https://wechat2rss.xlab.app/img-proxy/?k=aaf88a5a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcX5ltUN1LQB8K8YYKHwwadehXJjvFuegJP4w1qoggiaicyxibv91n6fgHZA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: center;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><em style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 13px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;" mpa-font-style="me766but1bnq" data-mpa-action-id="me766bvf9hh"><span textstyle="" style="letter-spacing: 1px;color: rgb(136, 136, 136);">较知名的Flickr30k Entities数据集</span></span></em></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">并且GLM-4.5V的Grounding的能力还附带了「推理魔法」。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">比如下面这张《我，机器人》剧照中，有一个机器人明显看着比其他机器人更有灵魂。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-backh="308" data-backw="562" data-height="726" data-imgfileid="505135314" data-ratio="0.5481481481481482" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-type="png" data-w="1080" data-width="1324" src="https://wechat2rss.xlab.app/img-proxy/?k=c0cb3fa3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXMYkIvIGu7AoG1jAglY4icWaeOssFSrAkyKHicgsPfvXD0f6Ph0Pich3Tw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">GLM-4.5V一下子就找到了！这确实很令人惊讶，4.5V的视觉能力已经可以理解表情了。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">而且你仔细看这个Grounding的Box，完全贴着右下角的机器人，即使是胳膊部分也几乎相切，确实有点东西。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img data-imgfileid="505135317" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.4777777777777778" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-width="1942" data-height="928" data-backw="562" data-backh="269" src="https://wechat2rss.xlab.app/img-proxy/?k=5b7ca540&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXwza6w8Khy6LdOhGZGEPicWtFLpzok3Ygwxibrdkk2N1et084fHQbCCEQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><div style="margin-bottom: 0px;"><p style="line-height: 1.75em;margin: 0px 8px 8px;"><strong style="letter-spacing: 0.578px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 17px;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><img data-imgfileid="505100592" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.25" data-s="300,640" data-type="png" data-w="292" style="margin-bottom: 0px;width: 81px !important;height: auto;" type="block" src="https://wechat2rss.xlab.app/img-proxy/?k=a1d4a63d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb351381bTy5MO2IN89mV41M88GEiaCCibDxJoaQjYV6HfRtafnmEmfM3R1p0tmkHgBOVuXBD6UJKpsQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/></span></strong></p></div><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 8px;margin-right: 8px;"><span style="letter-spacing: 1px;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">看图猜地址</span></strong></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">除了可以在GeoGuessr中玩，GLM-4.5V这次还可以通过随机照片来推理地址。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">比如上传一张照片，GLM-4.5V能通过建筑特征来识别照片是在哪里拍摄的。</span></span></p><p style="text-align: center;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;" nodeleaf=""><img data-imgfileid="505135372" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.2638888888888889" data-s="300,640" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" type="block" data-backw="562" data-backh="148" src="https://wechat2rss.xlab.app/img-proxy/?k=4dc317f9&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXI90vAzGZtdib4je09ibbk0Aa2Dr07WvrTGhC8MmfPYHeeU7k6ib6AcezA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">这个推理结果和GPT-5 Pro结果相同。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">甚至在描述判断逻辑方面，GLM-4.5V看起来更胜一筹，因为模型不仅注意到建筑风格，还从门牌号上识别到北欧古典建筑。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-backh="374" data-backw="562" data-height="638" data-imgfileid="505135319" data-ratio="0.6659707724425887" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-type="png" data-w="958" data-width="958" src="https://wechat2rss.xlab.app/img-proxy/?k=8611f062&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXlicberbDqSkNo1s2xlicXcB2NjR0IbJygVTiciceiay1icXlI0kUSHEg70Xg%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><div style="margin-bottom: 0px;"><p style="line-height: 1.75em;margin: 0px 8px 8px;"><strong style="letter-spacing: 0.578px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 17px;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><img data-imgfileid="505100592" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.25" data-s="300,640" data-type="png" data-w="292" style="margin-bottom: 0px;width: 81px !important;height: auto;" type="block" src="https://wechat2rss.xlab.app/img-proxy/?k=a1d4a63d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb351381bTy5MO2IN89mV41M88GEiaCCibDxJoaQjYV6HfRtafnmEmfM3R1p0tmkHgBOVuXBD6UJKpsQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/></span></strong></p></div><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 8px;margin-right: 8px;"><span style="letter-spacing: 1px;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">视频理解能力</span></strong></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">这次GLM-4.5V另一个重大更新就是视频理解。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">类似这种超现实主义的视频，GLM-4.5V也能完全get到视频中的重点元素和隐喻含义。</span></span></p><p nodeleaf="" style="margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">它甚至识别出了特斯拉Cybertruck。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img data-imgfileid="505135321" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.23333333333333334" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-width="1972" data-height="460" data-backw="562" data-backh="131" src="https://wechat2rss.xlab.app/img-proxy/?k=74309219&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXP1aTT77QkW91gzRIkgfAlUwQ2mtUsdlpicE2hicrTlq9ibELJD6ZRbSXA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">或者像这种偏重于抽象的视频，GLM-4.5V也能理解，并且可以给出非常深度的解释。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span data-lark-record-format="docx/record" style="margin-bottom: 0px;"></span></p><p nodeleaf="" style="margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">宇宙、人类、精神、灵魂、科技、艺术，GLM-4.5V还是真的大超预期。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-backh="566" data-backw="562" data-height="1610" data-imgfileid="505135343" data-ratio="1.0074074074074073" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-type="png" data-w="1080" data-width="1598" src="https://wechat2rss.xlab.app/img-proxy/?k=99fb309d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXhXdpDBCRv295ERof8Yb9wdFVGreOXAczXjrCd1oTrDbaXGlGoU0ibBw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><div style="margin-bottom: 0px;"><p style="line-height: 1.75em;margin: 0px 8px 8px;"><strong style="letter-spacing: 0.578px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 17px;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><img data-imgfileid="505100592" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.25" data-s="300,640" data-type="png" data-w="292" style="margin-bottom: 0px;width: 81px !important;height: auto;" type="block" src="https://wechat2rss.xlab.app/img-proxy/?k=a1d4a63d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb351381bTy5MO2IN89mV41M88GEiaCCibDxJoaQjYV6HfRtafnmEmfM3R1p0tmkHgBOVuXBD6UJKpsQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/></span></strong></p></div><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 8px;margin-right: 8px;"><span style="letter-spacing: 1px;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">空间关系理解</span></strong></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">视觉能力中，有一项很重要的空间理解能力，比如这个包含常见</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">物体空间关系图。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">我们随机给关系打上马赛克，然后让GLM-4.5V来定义物体的空间关系。</span></span></p><p style="text-align: center;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;" nodeleaf=""><img data-imgfileid="505135373" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.3101851851851852" data-s="300,640" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" type="block" data-backw="562" data-backh="174" src="https://wechat2rss.xlab.app/img-proxy/?k=cff769cf&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXANj7yK853mvlzTULwL7bBUcZTicvibB8vC96dib5Rv6xXJicuyibpHqpWHA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">单箭头的情况下，多次测试GLM-4.5V每次都可以判断正确，正确率100%。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-backh="190" data-backw="562" data-height="668" data-imgfileid="505135344" data-ratio="0.3388888888888889" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-type="png" data-w="1080" data-width="1970" src="https://wechat2rss.xlab.app/img-proxy/?k=41034f6a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXt9CFC8lYY0jJyg6Joicbdicl6S8fPfVAV9Gxn0ugibdw9Uz6Kic0HhicwRQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">多个箭头的情况下，会有偶尔的识别出现失误，比如应该是Behind的情况会识别为旁边。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img data-imgfileid="505135347" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.2953703703703704" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-width="1970" data-height="582" data-backw="562" data-backh="166" src="https://wechat2rss.xlab.app/img-proxy/?k=b6b910c7&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXY0s74gdGY1Nv9jTALY5yfSXBicMm1YJfGKrvvzN2Uj8auaAcaErEkRQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">但整体模型在空间理解上，来的一个新的高度。</span></span></p><div style="margin-bottom: 0px;"><p style="line-height: 1.75em;margin: 0px 8px 8px;"><strong style="letter-spacing: 0.578px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 17px;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><img data-imgfileid="505100592" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.25" data-s="300,640" data-type="png" data-w="292" style="margin-bottom: 0px;width: 81px !important;height: auto;" type="block" src="https://wechat2rss.xlab.app/img-proxy/?k=a1d4a63d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb351381bTy5MO2IN89mV41M88GEiaCCibDxJoaQjYV6HfRtafnmEmfM3R1p0tmkHgBOVuXBD6UJKpsQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/></span></strong></p></div><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 8px;margin-right: 8px;"><span style="letter-spacing: 1px;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">前端能力：UI到Code</span></strong></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">这次GLM-4.5V更新的另一大看点是可以通过UI界面直接转化为Code。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">比如我们用GLM-4.5V的官网截图制作了一个「它自己」。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-backh="280" data-backw="562" data-height="1496" data-imgfileid="505135349" data-ratio="0.49907407407407406" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-type="png" data-w="1080" data-width="2998" src="https://wechat2rss.xlab.app/img-proxy/?k=eeb53d07&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXDBic2zyJmjNJ2PBmw0aPEXUJKwPPha86gKibsXX9s99jhNWwEF8guPOQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">不得不说，GLM-4.5V编程能力确实很强，做出来的网站一模一样，甚至连左侧的Emoji都带上了，画面比例和UI风格也做到了1:1复刻。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-backh="279" data-backw="562" data-height="1490" data-imgfileid="505135348" data-ratio="0.49722222222222223" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-type="png" data-w="1080" data-width="2998" src="https://wechat2rss.xlab.app/img-proxy/?k=7c721510&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXChyFX6tGLQFibUSibVDXtticwu70NJUT9eqZvAIBxMc4PMWGPFWdxI1jA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><div style="margin-bottom: 0px;"><p style="line-height: 1.75em;margin: 0px 8px 8px;"><strong style="letter-spacing: 0.578px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 17px;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><img data-imgfileid="505100592" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.25" data-s="300,640" data-type="png" data-w="292" style="margin-bottom: 0px;width: 81px !important;height: auto;" type="block" src="https://wechat2rss.xlab.app/img-proxy/?k=a1d4a63d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb351381bTy5MO2IN89mV41M88GEiaCCibDxJoaQjYV6HfRtafnmEmfM3R1p0tmkHgBOVuXBD6UJKpsQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/></span></strong></p></div><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 8px;margin-right: 8px;"><span style="letter-spacing: 1px;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">图像识别能力</span></strong></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">有名的Magic Eye测试图片集，GLM-4.5V也能准确识别，比如下图这种多种鱼类拼凑的重复画面。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img data-imgfileid="505135351" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.7157407407407408" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-width="1574" data-height="1126" data-backw="562" data-backh="402" src="https://wechat2rss.xlab.app/img-proxy/?k=3daefcda&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXjo490xvlwPLl4pPUkIoyDAoAkr5gkI9ibUl08Wia9zbyq7S1vLPmrKVQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">GLM-4.5V甚至可以定位到「橙色带条纹」，肉眼想看的话，还是需要放大并且仔细观察的。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img data-imgfileid="505135350" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.19722222222222222" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-width="1978" data-height="390" data-backw="562" data-backh="111" src="https://wechat2rss.xlab.app/img-proxy/?k=4c1ca37c&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXWg59icNJqcZkHNod9HciboEc5ypVSJWqZ5mnUlibkAFDdfCiampSs9xWQw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><div style="margin-bottom: 0px;"><p style="line-height: 1.75em;margin: 0px 8px 8px;"><strong style="letter-spacing: 0.578px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 17px;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><img data-imgfileid="505100592" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.25" data-s="300,640" data-type="png" data-w="292" style="margin-bottom: 0px;width: 81px !important;height: auto;" type="block" src="https://wechat2rss.xlab.app/img-proxy/?k=a1d4a63d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb351381bTy5MO2IN89mV41M88GEiaCCibDxJoaQjYV6HfRtafnmEmfM3R1p0tmkHgBOVuXBD6UJKpsQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/></span></strong></p></div><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 8px;margin-right: 8px;"><span style="letter-spacing: 1px;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">视觉模型的「数数」能力</span></strong></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">再来一个世界模型经常遇到的「数数」问题，模型需要识别图片中的物体种类和数量。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">这些问题对于人类来说很简单，但是对于VLM就没那么容易了。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">在这种「目标搜索」任务中VLM的表现，会随着场景里目标数量的增多而迅速下降。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-backh="215" data-backw="562" data-height="580" data-imgfileid="505135355" data-ratio="0.3824074074074074" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-type="png" data-w="1080" data-width="1518" src="https://wechat2rss.xlab.app/img-proxy/?k=e966d9e3&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXnwHzEf8MZ2gibH7h5saC2XBA1CwOo4xQGhYFnApYGibic72EOn27jrWicQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">GLM-4.5V准确的识别到松饼和羊，并且完成了左上、左下和右上的数量识别。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">右下人类也很难数得清，但GLM-4.5V表示他数了个大概，非常拟人了，这里的处理几乎可以说得上完美。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: justify;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img data-imgfileid="505135354" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.33796296296296297" data-type="png" data-w="1080" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-width="1756" data-height="594" data-backw="562" data-backh="190" src="https://wechat2rss.xlab.app/img-proxy/?k=f534c75f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcX94WJEHtbSdHy0GUWImkHib8nAk6M68X3HQmtBQW3pGjUMYhia6g0VC6w%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">以上实测并不是测试的全部，但是GLM-4.5V除了能力很强外，最大的特点是又快又好玩，基本上很多任务都是秒出。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">而且更有意思的是，每个任务都会自动匹配一个题目+一个Emoji，这代表模型真正的理解了任务的核心。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">很多Emoji配的都无比形象，这在其他很多产品中都没有这个功能。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-left: 8px;margin-right: 8px;margin-bottom: 48px;" data-mpa-action-id="me767ib9fl9"><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-backh="724" data-backw="239" data-height="1496" data-imgfileid="505135353" data-ratio="3.02834008097166" style="flex-basis: auto;background-color: transparent;margin-bottom: 0px;width: 317.28px !important;height: auto;" data-type="png" data-w="494" data-width="494" src="https://wechat2rss.xlab.app/img-proxy/?k=7cfd6f39&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcXdOLeMyHJ8ybozCcqs1IqMRY8HlzY17lCLLeDPeY8OSVQ9jwib5jmNrw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: center;margin: 0px 8px;" nodeleaf=""><img data-imgfileid="505095291" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.5267857142857143" data-s="300,640" data-type="png" data-w="112" style="margin-bottom: 0px;width: 85px !important;height: auto;" src="https://wechat2rss.xlab.app/img-proxy/?k=a806d890&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb3uEdSPKrwGNmZEOaaGyzVvZ8dTtE9jU1rFsda3llYbCZpmWfiazUYjWBLTGvlPpXucH8Q0lEUJN3Q%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></p><p style="text-align: center;margin: 8px 8px 24px;line-height: 1.75em;"><span style="color: rgb(0, 0, 0);font-size: 19px;letter-spacing: 1px;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">技术创新</span></strong></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">开头我们介绍了GLM-4.5V基于智谱新发布的新一代旗舰文本基座模型GLM-4.5-Air，沿用GLM-4.1V-Thinking的结构。</span></span></p><div style="margin-bottom: 0px;"><p style="line-height: 1.75em;margin: 0px 8px 8px;"><strong style="letter-spacing: 0.578px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 17px;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><img data-imgfileid="505100592" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.25" data-s="300,640" data-type="png" data-w="292" style="margin-bottom: 0px;width: 81px !important;height: auto;" type="block" src="https://wechat2rss.xlab.app/img-proxy/?k=a1d4a63d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb351381bTy5MO2IN89mV41M88GEiaCCibDxJoaQjYV6HfRtafnmEmfM3R1p0tmkHgBOVuXBD6UJKpsQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/></span></strong></p></div><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 8px;margin-right: 8px;"><span style="letter-spacing: 1px;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">GLM-4.5V模型原理</span></strong></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">GLM-4.5V由视觉编码器、MLP 适配器和语言解码器三部分组成，支持64K多模态长上下文。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">视觉编码器采用AIMv2-Huge，支持图像与视频输入，并通过三维卷积提升视频处理效率。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">模型引入三维旋转位置编码（3D-RoPE）和双三次插值机制，增强了对高分辨率和极端宽高比图像的适应性。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">同时，语言解码器中的位置编码扩展为3D 形式（3D-RoPE），进一步提升了多模态空间理解能力。</span></span></p><div style="margin-bottom: 0px;"><p style="line-height: 1.75em;margin: 0px 8px 8px;"><strong style="letter-spacing: 0.578px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 17px;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><img data-imgfileid="505100592" alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-ratio="0.25" data-s="300,640" data-type="png" data-w="292" style="margin-bottom: 0px;width: 81px !important;height: auto;" type="block" src="https://wechat2rss.xlab.app/img-proxy/?k=a1d4a63d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb351381bTy5MO2IN89mV41M88GEiaCCibDxJoaQjYV6HfRtafnmEmfM3R1p0tmkHgBOVuXBD6UJKpsQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/><img class="rich_pages wxw-img" style="margin-bottom: 0px;" data-src=""/></span></strong></p></div><p style="margin-bottom: 0px;line-height: 1.75em;margin-left: 8px;margin-right: 8px;"><span style="letter-spacing: 1px;margin-bottom: 0px;"><strong style="margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;">GLM-4.5V训练策略</span></strong></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">GLM-4.5V 采用三阶段策略：预训练、监督微调（SFT）和强化学习（RL）。</span></span></p><ul style="margin-left: 8px;margin-right: 8px;margin-bottom: 0px;" class="list-paddingleft-1"><li style="font-size: 15px;margin-bottom: 0px;"><p style="text-align: justify;line-height: 1.75em;margin-bottom: 8px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">在预训练阶段，结合大规模图文交错多模态语料和长上下文内容，强化了模型对复杂图文及视频的处理能力</span></span></p></li><li style="font-size: 15px;margin-bottom: 0px;"><p style="text-align: justify;line-height: 1.75em;margin-bottom: 8px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">在SFT阶段，引入了显式「思维链」格式训练样本，增强了GLM-4.5V的因果推理与多模态理解能力；</span></span></p></li><li style="font-size: 15px;margin-bottom: 0px;"><p style="text-align: justify;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">在RL阶段，引入全领域多模态课程强化学习，通过构建多领域奖励系统（Reward System），结合可验证奖励强化学习（RLVR）与基于人类反馈的强化学习（RLHF），GLM-4.5V在STEM问题、多模态定位、Agent任务等方面获得全面优化。</span></span></p></li></ul><div style="line-height: 1.75;letter-spacing: 1px;word-break: break-word;color: rgb(91, 91, 91);border-left: 8px solid rgba(158, 158, 158, 0.3);border-radius: 5px;background: rgba(158, 158, 158, 0.1);padding-top: 24px;padding-bottom: 24px;padding-right: 8px;margin-top: 0px;margin-bottom: 0px;"><p style="font-size: 15px;margin: 0px 8px;padding-left: 8px;padding-right: 8px;line-height: 1.75em;letter-spacing: 1px;"><span leaf="" style="margin-bottom: 0px;">更多技术细节，请查看发布的GLM-4.5V技术报告。</span><span leaf="" style="margin-bottom: 0px;"><br/></span></p><p style="font-size: 15px;margin: 0px 8px;padding-left: 8px;padding-right: 8px;line-height: 1.75em;letter-spacing: 1px;"><span leaf="" style="margin-bottom: 0px;"><a href="https://github.com/zai-org/GLM-V" target="_blank">https://github.com/zai-org/GLM-V</a></span></p></div><p style="text-align: justify;margin: 24px 8px;line-height: 1.75em;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">从4月份OpenA的GPT-4o「原生全能多模态模型」引发的「吉卜力热」就能看出，多模态是模型发展的必然。</span></span></p><p nodeleaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-left: 8px;margin-right: 8px;margin-bottom: 24px;"><img alt="图片" class="rich_pages wxw-img js_img_placeholder wx_img_placeholder" data-backh="150" data-backw="263" data-height="572" data-imgfileid="505135352" data-ratio="0.5685884691848907" style="margin-bottom: 0px;width: 661px !important;height: auto;" data-type="png" data-w="1006" data-width="1006" src="https://wechat2rss.xlab.app/img-proxy/?k=447bdd8a&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcX3BkL5fmsVvvUgxwnKrlEFScvYshFJJCtpp8XGdas1ZTF9pdAonSx6w%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg%26watermark%3D1"/></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">多模态这一能力之所以重要，在于它模拟了人类利用多种感官综合感知世界的方式。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">通过将不同模态的信息优势结合，AI系统能够对复杂场景作出更整体化的判断。</span></span></p><p style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;line-height: 1.75em;letter-spacing: 0.034em;font-style: normal;font-weight: normal;text-align: center;margin-left: 8px;margin-right: 8px;margin-bottom: 0px;" nodeleaf="" data-mpa-action-id="me768z66yhz"><img alt="图片" class="rich_pages wxw-img js_insertlocalimg js_img_placeholder wx_img_placeholder __bg_gif" data-backh="446" data-backw="251" data-imgfileid="505135356" data-ratio="1.7761989342806395" data-s="300,640" type="block" data-type="gif" data-w="563" style="flex-basis: auto;background-color: transparent;margin-bottom: 0px;width: 389.99px !important;height: auto;" src="https://wechat2rss.xlab.app/img-proxy/?k=b8879336&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_gif%2FUicQ7HgWiaUb1Gx4vDhu01EOGGbFM95VcX1Oo7nYQNmGhdFhJrxD93qxmLthzHbCKkGfXKWCNN3oHU5fibPKBjj8g%2F640%3Fwx_fmt%3Dgif%26from%3Dappmsg"/></p><p style="text-align: center;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 14px;letter-spacing: 1px;color: rgb(136, 136, 136);">特斯拉机器人卖爆米花</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">而集成视觉、文本、推理、看视频等能力的视觉推理模型正成为企业侧升级的主战场。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">多模态大模型正从实验室走向现实，</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">用例也从单一走向多元</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，整体</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">价值也从演示</span></span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">Demo</span></span></strong><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">走向真正地实用</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">视觉语言模型在</span></span><strong style="margin-bottom: 0px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">提升人机交互自然度、提高专业工作效率、创造新内容形态</span></span></strong><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">等方面具有巨大潜力。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">总体来看，多模态大模型已从</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">「能力验证」</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">走向</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">「规模落地」</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">海外以OpenAI GPT、谷歌Gemini、Anthropic Claude领跑。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">国内阿里Qwen‑VL、</span></span><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">智谱GLM、字节Seed等在追赶并局部反超。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 24px;"><span leaf="" style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">而</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;color: rgb(255, 104, 39);font-weight: bold;">GLM-4.5V</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">为代表的视觉推理模型</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，将成为</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;font-weight: bold;">AI进化的新方向</span><span textstyle="" style="font-size: 15px;letter-spacing: 1px;">，未来的AI模型不仅要看得懂，还要能自主推理。</span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 0px;"><span style="color: rgba(0, 0, 0, 0.9);font-size: 17px;font-family: mp-quote, PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;letter-spacing: 0.034em;font-style: normal;font-weight: normal;margin-bottom: 0px;"><span style="font-size: 14px;letter-spacing: 1px;margin-bottom: 0px;" mpa-font-style="me76aexjr9s"><span style="letter-spacing: 1px;color: rgb(136, 136, 136);font-size: 14px;margin-bottom: 0px;" mpa-font-style="me76anzs1gli"><span leaf="" style="margin-bottom: 0px;">参考链接：</span></span></span></span><span leaf="" style="margin-bottom: 0px;"><br/></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 0px;"><span leaf="" mpa-font-style="me76anzs2149" style="font-size: 14px;margin-bottom: 0px;"><span textstyle="" style="letter-spacing: 1px;color: rgb(136, 136, 136);"><a href="https://github.com/zai-org/GLM-V" target="_blank">https://github.com/zai-org/GLM-V</a></span></span><span leaf="" style="margin-bottom: 0px;"><br/></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 0px;"><span leaf="" mpa-font-style="me76anzslnd" style="font-size: 14px;margin-bottom: 0px;"><span textstyle="" style="letter-spacing: 1px;color: rgb(136, 136, 136);"><a href="https://huggingface.co/collections/zai-org/glm-45v-68999032ddf8ecf7dcdbc102" target="_blank">https://huggingface.co/collections/zai-org/glm-45v-68999032ddf8ecf7dcdbc102</a></span></span><span leaf="" style="margin-bottom: 0px;"><br/></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 0px;"><span leaf="" mpa-font-style="me76anzs1atu" style="font-size: 14px;margin-bottom: 0px;"><span textstyle="" style="letter-spacing: 1px;color: rgb(136, 136, 136);"><a href="https://modelscope.cn/collections/GLM-45V-8b471c8f97154e" target="_blank">https://modelscope.cn/collections/GLM-45V-8b471c8f97154e</a></span></span><span style="font-size: 15px;letter-spacing: 1px;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"> </span></span></p><p style="text-align: justify;margin-left: 8px;margin-right: 8px;line-height: 1.75em;margin-bottom: 0px;"><span style="font-size: 15px;letter-spacing: 1px;margin-bottom: 0px;"><span leaf="" style="margin-bottom: 0px;"><br/></span></span></p><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247526266">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=c65654bd&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526266%26idx%3D3%26sn%3D6807575d4fd08be14e2e547828a40031">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Tue, 12 Aug 2025 14:38:00 +0800</pubDate>
    </item>
    <item>
      <title>知乎热议：计算机专业，选择公务员还是进击大厂？</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526254&amp;idx=1&amp;sn=b70c72547ee7ff42b7c13cdc716c5108</link>
      <description>毕业后的选择，或者说职业规划？</description>
      <content:encoded><![CDATA[<p>
<span></span> <span>2025-08-11 12:02</span> <span style="display: inline-block;">浙江</span>
</p>




<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=272df882&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2F87HjJEl4c1urCDnhtemib0vMo3bQEm09KKWsyramLD6mjMIP5p13SicpnukpxhpLtlmCQhvrCvwZ68AefibObGHPQ%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<div data-tool="markdown2wechat编辑器" data-website="https://aizhuanqian.com" style="font-size: 16px;color: black;padding: 0 10px;line-height: 1.6;word-spacing: 0px;letter-spacing: 0px;word-break: break-word;word-wrap: break-word;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#39;PingFang SC&#39;, Cambria, Cochin, Georgia, Times, &#39;Times New Roman&#39;, serif;" data-pm-slice="0 0 []"><p style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;color: black;line-height: 26px;"><span leaf="">毕业后的选择，或者说职业规划？</span></p><p><span leaf=""><img alt="图片" class="rich_pages wxw-img" data-ratio="0.6820349761526232" data-w="629" src="https://wechat2rss.xlab.app/img-proxy/?k=404fd4e2&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_png%2Fw8WIOkDOxtNa8hwUPh8pjJwJM9cHAGvaRMic02fVjSSnBsfV7m0qfvNwCJUpzwFtpJNB3wehesiauGc3gLFB8WQg%2F640%3Fwx_fmt%3Dpng%26tp%3Dwebp%26wxfrom%3D5%26wx_lazy%3D1"/></span></p><h2 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;border-bottom: 2px solid rgb(239, 112, 96);font-size: 1.3em;"><span style="display: none;"></span><span style="display: inline-block;font-weight: bold;background: rgb(239, 112, 96);color: #ffffff;padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;"><span leaf="">高赞回复一</span></span><span style="display: inline-block;vertical-align: bottom;border-bottom: 36px solid #efebe9;border-right: 20px solid transparent;"></span></h2><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">作者：知乎用户OY15Cx</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">如果家里穷得叮当响，父母要靠自己养活，自己还要独立买房买车结婚，经济上谁也靠不上；甚至父母身体不好要大量的医药费，家里有外债等等，那不用考虑，肯定是去大厂。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">去公务员？就算是最好的公务员，一开始一年也就是二十来万，这种发达地区公务员开销一般也不小，就算再怎么节俭，一年七八万也要花的，剩下十来万，多少年才能买房买车，过上像样点的生活？</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">更何况大多数公务员一年也就是几万块钱，连自己的日子都过得扣扣搜搜的，更不要说补贴家里了。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">比如说部委公务员，刚入职的公务员，试用期第一年到手不到六千，在北京很多还要自己租房子，真的要吃土。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">此外，如果你是一个特别在意物质享受的人，希望过点小资生活，经常出去旅游，去网红餐厅打卡，购买各种数码产品，化妆品等等，那选择去当公务员显然是会痛苦不堪的。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">只要你觉得自己实实在在的真的很缺钱，没钱日子就过不下去，那就好好去挣钱，至少先把当下的苦日子度过去再说。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">什么看长远，什么稳定，什么社会地位等等，在迫在眉睫的经济困难面前，都一文不值。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">并且一个特别在意经济收入的人，他压根熬不过公务员前面一无所有、穷得叮当响的十来年。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">反之，如果你家里经济条件还不错，没什么负担，甚至还能给你一些支持，或者你对物质条件这玩意儿要求不高，觉得有口饭就行，但又不想去卷，去996，自己能力也觉得卷不过，更不想三十多岁了又要面临重新找工作去折腾，追求安安稳稳，平平淡淡的生活，那肯定是选公务员的好。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">当然了，公务员也有很多种，好的职位和差的职位，比人和狗的区别都要大。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">有的地方公务员，又穷又累又没前途，比如类似河南除郑州之外的基层公务员。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">但有些地方有些单位公务员，一年二十来万，还有宿舍，工作不忙，提拔晋升也不满。比如说一些副省级城市的边缘市直部门。</span></p><h2 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;border-bottom: 2px solid rgb(239, 112, 96);font-size: 1.3em;"><span style="display: none;"></span><span style="display: inline-block;font-weight: bold;background: rgb(239, 112, 96);color: #ffffff;padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;"><span leaf="">高赞回复二</span></span><span style="display: inline-block;vertical-align: bottom;border-bottom: 36px solid #efebe9;border-right: 20px solid transparent;"></span></h2><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">作者：韩铭</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">取决于你想要的生活状态。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">我不是程序员，之前是字节2-2，在职考公做了一个省直gwy。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">大厂的生活就是不断的拼，不断的前进，不断的挣钱，然后享受生活。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">gwy的生活就是稳稳当当干活，手里这碗饭能够稳稳端到退休领工资。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">从生活状态来讲，gwy的日子跟大厂员工的日子没法比，以前在大厂，出国旅个游，在游戏里冲个万把块的完全可以不当回事，而且即使每周都在哐哐消费，最后发现还是能攒下不少钱。现在当gwy就不是这样了，每个月工资就那么点，想攒点钱真不容易，回来上班的前半年可以说一分钱都没攒下来，而且消费肯定也大幅降级了。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">从心理状态来讲，我觉得做gwy挺踏实的。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">以前在大厂，几乎每天都在想着整花活，因为大厂的工作可以说是“不进就死”，你不仅要卷，而且要卷的比别人更花，才能在这个环境里生存下来。虽然从结果来看，我是属于卷的还不错的，所有绩效都是M+以上，但说实话，心累是真的，有时候还得担心业务完不完蛋，时刻都要想办法保持自己的竞争力。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">现在做公务员就好很多，因为之前有过大厂工作经历，现在对待工作更坦然，一定会负责任的把事情干好，但也不会给自己强加压力。虽然现在的工作强度比之前在大厂要高不少，但整体上没太大的心理压力，努力把事情都结了就行了。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">这两种生活其实都挺好，我的同事很多就是奔着赚钱到35岁就放飞自我才留在大厂一直干的。我当初选择做gwy，其实主要还是家庭因素影响比较大。家里人大病一场之后，觉得还是能回家离家人朋友近一点比较好，而且在大厂干过几年，回来买房买车也不算吃力，生活应该可以平平淡淡过一生，所以最后选择了gwy。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">所以还是要看你想要的生活，想拼、能拼、能力强的话，大厂绝对能给你超乎想象的回报，我从校招进大厂到离开差不多5年时间，收入整整翻了三倍有余，还不算期权股票，刚毕业的时候想都不敢想能拿这么多钱。但如果只是想平平稳稳过过日子，gwy挺好的。</span></p><h2 data-tool="mdnice编辑器" style="margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;border-bottom: 2px solid rgb(239, 112, 96);font-size: 1.3em;"><span style="display: none;"></span><span style="display: inline-block;font-weight: bold;background: rgb(239, 112, 96);color: #ffffff;padding: 3px 10px 1px;border-top-right-radius: 3px;border-top-left-radius: 3px;margin-right: 3px;"><span leaf="">高赞回复三</span></span><span style="display: inline-block;vertical-align: bottom;border-bottom: 36px solid #efebe9;border-right: 20px solid transparent;"></span></h2><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">作者：知会参事</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf=""><span textstyle="" style="font-weight: bold;">大家都在说，先进厂挣大钱，35岁前进体制养老，这个规划确实理想，但是不容易实现，</span>且不说到35了还考不上的问题，只说一个，进大厂也不代表就能挣大钱。 我有个亲戚，985毕业，一毕业就进上海的大厂当程序员*，当时我们也以为他是去挣大钱的。干了几年，30岁左右回了老家，想考省直单位</span><em style="font-style: italic;color: black;"><span leaf="">的公务员，一直没考上，最后考了个县城事业编</span></em><span leaf="">。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">整个过程，看起来是在按规划来走，但实际上每个环节都打折了。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">第一，计划是进厂挣大钱，结果工作了七八年，没挣到什么钱，因为并不是每个程序员都能够获得高薪，准确地说，任何行业，都只有少数人可以做到靠前，大部分人也只是普普通通的打工族。他在上海的收入，只能覆盖日常生活水平，更没攒下钱来。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">第二，计划是30左右考公务员，但是考公也不是一件水到渠成的事，很多时候要看个人的运势，甚至有时候很玄学。我说这个朋友，考试很厉害，300分的省考他次次考200+，但次次都差那么一点，最后病急乱投医，考个县城事业编先干着，一干就是几年，期间一直考公，一直没考上，马上35了，就快没机会了。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">所以，先进大厂挣一大笔钱然后回家乡考个编制养老这件事，也是分顶配和丐版的，另一个回答中当程序员挣了3000万回家考上教师编（计算机信息课教师*），这就是顶配，而我亲戚进厂当码农七八年没攒下钱回来考个偏门事业编的，就算是低配或者丐版。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">而事实上，如果走这条路线的人有100个，那么大概95个都只能是丐版。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">年轻人一定要有一个清醒的认知，你大概率将会是一个普通人，一个普通水平的程序员，或者一个普通水平的公务员。你当程序员的时候，身边的一些同事薪酬不断上涨，而你岿然不动；你当公务员的时候，身边的一些同事三年提拔一级，而你十年了还稳如老狗，这才是现实。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">所以，个人建议，真的要作一下职业规划，拿出一段时间来试水，比如五年，不管是程序员还是公务员，五年期满，自己有多大的水平，有多大的前程，基本都清楚了。</span></p><p data-tool="mdnice编辑器" style="font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;"><span leaf="">另外，刚毕业的时候，如果非要把程序员和公务员这两份职业当成首选，那么就不要一棵树上吊死，一定要两手抓。可以先进厂干，同时有考试就考，等你面临职业选择（指的是两份工作都还不错难以抉择）的时候，再来思考自己想要什么样的人生。</span></p></div><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247526254">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=d283b2c4&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526254%26idx%3D1%26sn%3Db70c72547ee7ff42b7c13cdc716c5108">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Mon, 11 Aug 2025 12:02:00 +0800</pubDate>
    </item>
    <item>
      <title>【Python】我最常用的一个Python可视化工具，强烈推荐～</title>
      <link>https://mp.weixin.qq.com/s?__biz=MzIwODI2NDkxNQ==&amp;mid=2247526254&amp;idx=2&amp;sn=283a2ebe367d74d019006327c460f5ef</link>
      <description>说到Python数据可视化，最常用的要数matplotlib和seborn，它们几乎囊括了各种主流绘图场景，</description>
      <content:encoded><![CDATA[<p>
<span>Python大数据分析</span> <span>2025-08-11 12:02</span> <span style="display: inline-block;">浙江</span>
</p>




<p>
<img src="https://wechat2rss.xlab.app/img-proxy/?k=276a63cf&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_jpg%2Fg64sbb6Ffmd5KZNlsBorDOVcFczY5iaUAvExrTzs5hMy3LPezaZ3J0zXsRbevAwPBEwneP9CtR82Q5ibQF2icP7Fg%2F0%3Fwx_fmt%3Djpeg"/>
</p>


<div data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="margin-top: 0px;margin-bottom: 0px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 10px;padding-right: 10px;background-attachment: scroll;background-clip: border-box;background-color: rgba(0, 0, 0, 0);background-image: linear-gradient(90deg, rgba(50, 0, 0, 0.05) 3%, rgba(0, 0, 0, 0) 3%), linear-gradient(360deg, rgba(50, 0, 0, 0.05) 3%, rgba(0, 0, 0, 0) 3%);background-origin: padding-box;background-repeat: no-repeat;background-size: 20px 20px;width: auto;font-family: Optima-Regular, ptima-Regular, ptima-Regular, ptima-Regular, ptima-Regular;font-size: 16px;color: rgb(89, 89, 89);line-height: 1.75;word-spacing: 0em;letter-spacing: 2px;word-break: break-word;overflow-wrap: break-word;text-align: left;background-position-x: center;background-position-y: center;" data-pm-slice="0 0 []"><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">说到Python数据可视化，最常用的要数matplotlib和seborn，它们几乎囊括了各种主流绘图场景，比如科研绘图、商业绘图、kaggle比赛绘图等，但这两也有短板，不适合动态和交互式绘图，而能弥补这一功能的就是Python中另一可视化明星工具-Bokeh，它可以绘制非常灵活的web可视化图表。</span></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="511601349" data-ratio="0.29842931937172773" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-type="png" data-w="764" src="https://wechat2rss.xlab.app/img-proxy/?k=ff404e26&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmd5KZNlsBorDOVcFczY5iaUAiaQSUTClcS15exfyrTyKaYraKBibM5ogJT8kBSGS8W1gXQDYHhI2Ghhw%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">为什么说Bokeh交互能力强呢？因为它原生支持HTML和JavaScript渲染图表，而不是像matplotlib那样需要后端渲染，所以Bokeh能很轻松的集成Flask、Django，进行web可视化开发。</span></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="511601353" data-ratio="0.7518518518518519" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=5b133e56&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmd5KZNlsBorDOVcFczY5iaUAQGrakcVus2WykrWRZcsQ2ssxkdyJb4DfgrxztCFjqSOCibBbCKOtYjA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">Bokeh支持的图表类型很丰富，基本的图表比如线图、散点图、柱状图、饼图、面积图、直方图、地图等，都可以支持，而且UI美化简单直接，不需要复杂的调整。</span></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img data-imgfileid="511601351" class="rich_pages wxw-img" data-ratio="0.5555555555555556" data-type="png" data-w="1080" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" src="https://wechat2rss.xlab.app/img-proxy/?k=e6d11490&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmd5KZNlsBorDOVcFczY5iaUAllkRUMRLQwSLicXocvpNT7fp46IKBGh2iakd8wPaQYwb2jzDRrtZOWtg%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">作为交互能力出众的可视化库，Bokeh提供了很多交互组件，比如平移、缩放、悬停、选择等，支持各种控件，比如按钮、滑块、下拉菜单、复选框等，通过Bokeh服务器来启用Python回调和实时更新的Web应用程序框架。</span></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="511601350" data-ratio="0.27685185185185185" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=b20c4724&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmd5KZNlsBorDOVcFczY5iaUACqN4BibiaFzjfnRAOfiak7YKX84gexKoZDaicn20ClNZjFe0SETib3ewmlA%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">比如绘制这种动态气泡图，也是信手拈来。</span></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img data-imgfileid="511601352" class="rich_pages wxw-img" data-ratio="0.5787037037037037" data-type="png" data-w="1080" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" src="https://wechat2rss.xlab.app/img-proxy/?k=4fe3cb91&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmd5KZNlsBorDOVcFczY5iaUAPk8xWOAnV5GYWricqsbUEyIxXgPrckwBCvAL9RZYUOCqiapmJIKrvRyQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">它的定制化能力虽然没有matplotlib那么强，但基本的图表元素都可以自定义，比如轴、标题、图例、日期选择器、颜色与大小等，并且可以通过组件来调整。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">Bokeh相比其他可视化库的另一个优势是它能很好的处理实时数据流，可以及时的展示数据的变化，比如电商数据沙盘、企业经营大屏、股票实时走势等，可以集成到web应用中，而且能结合Python的数据处理库进行实时的数据清洗、建模，并展示数据，非常的好用。</span></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">在数据源方面，Bokeh能直接读取numpy或者pandas数据格式进行可视化展示，无缝集成pandas主流数据科学库，而且可以导出png、svg和表格。</span></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="511601354" data-ratio="0.6212962962962963" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=4de5dcc4&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmd5KZNlsBorDOVcFczY5iaUAxt83lK5Q25Uz2dSMUqq8WhVtdh7WBKfhJhGTjKAxgvJEic8tSaCZ5YQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">如何安装Bokeh呢？很简单，直接使用pip安装即可，在命令行输入：</span></p><p class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js" data-lang="nginx"><code><span leaf=""><span class="code-snippet__attribute">pip3</span> install bokeh</span></code></pre></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">如果下载慢的话，可以配置临时镜像源。</span></p><p class="code-snippet__fix code-snippet__js"><ul class="code-snippet__line-index code-snippet__js"><li></li></ul><pre class="code-snippet__js" data-lang="ruby"><code><span leaf="">pip install bokeh -i <span class="code-snippet__symbol">https:</span>/<span class="code-snippet__regexp">/mirrors.aliyun.com/pypi/simple/</span></span></code></pre></p><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">只需要简单的几行代码，就可以绘制出一个折线图。</span></p><pre data-tool="mdnice编辑器" style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;"><span data-cacheurl="" data-remoteid="" style="display: block;background: none;height: 30px;width: 100%;background-size: 40px;background-repeat: no-repeat;background-color: #282c34;margin-bottom: -7px;border-radius: 5px;background-position: 10px 10px;background-image: url(&#34;https://mmbiz.qpic.cn/mmbiz_svg/wXJ5kSJT6OOQicxWXPS9zJURFIqYn5jE37tsib6uc2IFuMALdcicCh1nKZGyWBfRoLtTVReCLgibaXTxcwhO0ErsequFGxXJFMtp/640?wx_fmt=svg&amp;from=appmsg&#34;);"></span><code style="overflow-x: auto;padding: 16px;color: #abb2bf;padding-top: 15px;background: #282c34;border-radius: 5px;display: -webkit-box;font-family: Consolas, Monaco, Menlo, monospace;font-size: 12px;"><span style="color: #c678dd;line-height: 26px;"><span leaf="">from</span></span><span leaf=""> bokeh.plotting </span><span style="color: #c678dd;line-height: 26px;"><span leaf="">import</span></span><span leaf=""> figure, show</span><span leaf=""><br/></span><span leaf="">p = figure(width=</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">400</span></span><span leaf="">, height=</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">400</span></span><span leaf="">)</span><span leaf=""><br/></span><span style="color: #5c6370;font-style: italic;line-height: 26px;"><span leaf=""># add a line renderer</span></span><span leaf=""><br/></span><span leaf="">p.line([</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">1</span></span><span leaf="">, </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">2</span></span><span leaf="">, </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">3</span></span><span leaf="">, </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">4</span></span><span leaf="">, </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">5</span></span><span leaf="">], [</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">6</span></span><span leaf="">, </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">7</span></span><span leaf="">, </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">2</span></span><span leaf="">, </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">4</span></span><span leaf="">, </span><span style="color: #d19a66;line-height: 26px;"><span leaf="">5</span></span><span leaf="">], line_width=</span><span style="color: #d19a66;line-height: 26px;"><span leaf="">2</span></span><span leaf="">)</span><span leaf=""><br/></span><span leaf="">show(p)</span><span leaf=""><br/></span></code></pre><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="511601355" data-ratio="0.9700460829493087" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-type="png" data-w="868" src="https://wechat2rss.xlab.app/img-proxy/?k=417be09f&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmd5KZNlsBorDOVcFczY5iaUAxhpUVUfjk0IRrnP4ZOQg0bKyZUnk2DDiamQbhqRN8BRAnvPx1E0D50A%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><p data-tool="mdnice编辑器" style="color: rgb(89, 89, 89);font-size: 16px;line-height: 1.8em;letter-spacing: 2px;text-align: left;text-indent: 0em;padding-top: 8px;padding-bottom: 8px;padding-left: 0px;padding-right: 0px;margin-top: 10px;margin-right: 0px;margin-bottom: 10px;margin-left: 0px;word-spacing: 2px;"><span leaf="">其他更多好看的Bokeh交互式图表可以看下面示例：</span></p><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img data-imgfileid="511601356" class="rich_pages wxw-img" data-ratio="0.587037037037037" data-type="png" data-w="1080" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" src="https://wechat2rss.xlab.app/img-proxy/?k=36ee5d94&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmd5KZNlsBorDOVcFczY5iaUAPY0WZNyeRibPq0OerVT6YBWK256VoepRO2TOa9GBkjFRK46zzuOgO2g%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img data-imgfileid="511601358" class="rich_pages wxw-img" data-ratio="0.4666666666666667" data-type="png" data-w="1080" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" src="https://wechat2rss.xlab.app/img-proxy/?k=472e3268&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmd5KZNlsBorDOVcFczY5iaUAYicdnUukiaEmKvxRWmIXTFup2egd5q5cLukNcd4gG3rSmm2H5ed6K8wQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img data-imgfileid="511601357" class="rich_pages wxw-img" data-ratio="0.9888888888888889" data-type="png" data-w="1080" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" src="https://wechat2rss.xlab.app/img-proxy/?k=1b19735b&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmd5KZNlsBorDOVcFczY5iaUAH2N23FmBsCNKa0aW9u98FblheEVaUvvP5bwIJdxDicdwIibnCL755EcQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img data-imgfileid="511601361" class="rich_pages wxw-img" data-ratio="1.038888888888889" data-type="png" data-w="1080" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" src="https://wechat2rss.xlab.app/img-proxy/?k=bae0330d&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmd5KZNlsBorDOVcFczY5iaUAK84tulibfceRbClxYL8DGF88jZiaEsmKXlf9ImxfRvZ4ic8r31b6SA3rQ%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure><figure data-tool="mdnice编辑器" style="margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;display: flex;flex-direction: column;justify-content: center;align-items: center;"><span leaf=""><img class="rich_pages wxw-img" data-imgfileid="511601360" data-ratio="0.6574074074074074" style="display: block;margin-top: 20px;margin-right: auto;margin-bottom: 20px;margin-left: auto;max-width: 100%;border-top-style: none;border-bottom-style: none;border-left-style: none;border-right-style: none;border-top-width: 3px;border-bottom-width: 3px;border-left-width: 3px;border-right-width: 3px;border-top-color: rgba(0, 0, 0, 0.4);border-bottom-color: rgba(0, 0, 0, 0.4);border-left-color: rgba(0, 0, 0, 0.4);border-right-color: rgba(0, 0, 0, 0.4);border-top-left-radius: 0px;border-top-right-radius: 0px;border-bottom-right-radius: 0px;border-bottom-left-radius: 0px;object-fit: fill;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;" data-type="png" data-w="1080" src="https://wechat2rss.xlab.app/img-proxy/?k=a97341db&amp;u=https%3A%2F%2Fmmbiz.qpic.cn%2Fsz_mmbiz_png%2Fg64sbb6Ffmd5KZNlsBorDOVcFczY5iaUAeyiaj9Ko5lgjA6G4bDO2J3KRHicOS6fAa1icSQkP8Gj7bFxp8VvExA11Q%2F640%3Fwx_fmt%3Dpng%26from%3Dappmsg"/></span></figure></div><p class="mp_profile_iframe_wrp" nodeleaf=""><mp-common-profile class="js_uneditable custom_select_card mp_profile_iframe" data-pluginname="mpprofile" data-nickname="机器学习初学者" data-alias="ai-start-com" data-from="0" data-headimg="http://mmbiz.qpic.cn/mmbiz_png/87HjJEl4c1vSBtxuPnpNSm5AicT6KZc2LTL7qzcoib594qluPAqY3zhJt483xqNbqtLAoIKFXYIfIViaOPl89bxnQ/0?wx_fmt=png" data-signature="致力于为初学者提供学习路线和基础资料，含慕课和代码、教案等，建议收藏！" data-id="MzIwODI2NDkxNQ==" data-is_biz_ban="0" data-service_type="1" data-verify_status="0"></mp-common-profile></p><p style="display: none;"><mp-style-type data-value="3"></mp-style-type></p>



<p><a href="2247526254">阅读原文</a></p>
<p><a href="https://wechat2rss.xlab.app/link-proxy/?k=3c07cbcb&amp;r=1&amp;u=https%3A%2F%2Fmp.weixin.qq.com%2Fs%3F__biz%3DMzIwODI2NDkxNQ%3D%3D%26mid%3D2247526254%26idx%3D2%26sn%3D283a2ebe367d74d019006327c460f5ef">跳转微信打开</a></p>
]]></content:encoded>
      <pubDate>Mon, 11 Aug 2025 12:02:00 +0800</pubDate>
    </item>
  </channel>
</rss>