---
title: "正则表达式的优化措施"
author: "mywebcode"
date: "2011-12-15T22:02:00Z"
tags: []
slug: "untitled"
draft: false
lastmod: "2013-05-08T10:14:25Z"
id: 1862493
url: "https://mywebcode.iteye.com/blog/1862493"
---

1)编译缓存;

2)预查必须字符/子字符串优化;

3)长度判断优化;

4)字符串起始/锚点优化;

5)消除无必要的括号或字符组;