---
title: "正则表达式中/i,/g,/ig,/gi,/m的区别和含义 "
author: "real_junlin"
date: "2010-12-30T11:27:14Z"
tags: []
categories: ["编程语言"]
slug: "i-g-ig-gi-m"
draft: false
lastmod: "2010-12-30T11:27:14Z"
id: 855646
url: "https://real-junlin.iteye.com/blog/855646"
---

正则表达式中/i,/g,/ig,/gi,/m的区别和含义

/i (忽略大小写)  
/g (全文查找出现的所有匹配字符)  
/m (多行查找)  
/gi(全文查找、忽略大小写)  
/ig(全文查找、忽略大小写)

 

 

 

 

 

 

 

 

原帖地址 [http://www.iteye.com/wiki/coos/1848-the-regular-expression-i-g-ig-gi-m-and-the-meaning-of-the-distinction-between](http://www.iteye.com/wiki/coos/1848-the-regular-expression-i-g-ig-gi-m-and-the-meaning-of-the-distinction-between)