---
title: "Golang正则规则"
url: "https://johng.cn/programming/golang-regex-rules"
markdown_url: "https://johng.cn/programming/golang-regex-rules.md"
type: "doc"
section: "开发语言"
category: "开发语言 / Golang"
published: "2026-09-18"
updated: "2026-09-18"
description: "介绍 Go 语言使用的 re2 正则表达式规则，包括语法、用法和注意事项"
keywords: ["Golang", "正则表达式", "re2", "正则规则", "字符串处理", "模式匹配"]
---

# Golang正则规则

`Golang`使用的是`re2`正则规则，具体规则请参考：[https://github.com/google/re2/wiki/Syntax](https://github.com/google/re2/wiki/Syntax)
