GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Python/Article/python14/4.md at master · Msder/Python

Expand file tree

/

4.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
18 lines (13 loc) · 1.03 KB
/

4.md

Copy path

File metadata and controls

18 lines (13 loc) · 1.03 KB
Raw
Copy raw file
Download raw file
Edit and raw actions

边界匹配符和组

将上面几个点,就用了很大的篇幅了,现在介绍一些边界匹配符和组的概念。

一般的边界匹配符有以下几个:

语法 描述
^ 匹配字符串开头(在有多行的情况中匹配每行的开头)
$ 匹配字符串的末尾(在有多行的情况中匹配每行的末尾)
\A 仅匹配字符串开头
\Z 仅匹配字符串末尾
\b 匹配 \w 和 \W 之间
\B [^\b]

分组,被括号括起来的表达式就是分组。分组表达式 (...) 其实就是把这部分字符作为一个整体,当然,可以有多分组的情况,每遇到一个分组,编号就会加 1 ,而且分组后面也是可以加数量词的。

此处本应有例子,考虑到篇幅问题,就不贴了

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.