---
title: "golang"
author: "fyd222"
date: "2012-08-29T17:11:32Z"
tags: []
categories: ["编程语言"]
slug: "golang"
draft: false
lastmod: "2012-08-29T17:11:32Z"
id: 1666985
url: "https://fyd222.iteye.com/blog/1666985"
---

**Regexp :**

 

package main

 

import "fmt"

import "regexp"

 

func main() {

rex := regexp.MustCompile(\`\\\[\\\[(\[^\\]]+)\\]\\]\`)

fmt.Println(rex.FindAllStringSubmatch("\[\[1]] , , , \[\[2]]dfd",-1))

 

}