# Re: Small regexp question

**URL:** <https://www.ruby-forum.com/t/re-small-regexp-question/80066>\
**Category:** Ruby\
**Created:** [March 12, 2006, 12:27pm UTC](https://www.ruby-forum.com/t/re-small-regexp-question/80066 "2006-03-12T12:27:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjohn\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e5b9ba/32.png) [@Benjohn\_B](https://www.ruby-forum.com/u/Benjohn_B)\
**Post date:** [March 12, 2006, 12:27pm UTC](https://www.ruby-forum.com/t/re-small-regexp-question/80066/1 "2006-03-12T12:27:07Z")

</div>

Stefan M. said:

> You can use
> 
> /myregexp/m
> 
> but I’m not sure where this is documented.

Which is exactly what I was after, thanks.

The list of characters that you can slap on to the end are (cribbed from  
the Nutshell):

i =\> case-insensitive  
o =\> substitute only once.  
x =\> ignores whitespace so that you can put comments in to a regex.  
m =\> matches over multiple lines - newlines are treated as any other  
character.

And you can use combinations too, if you fancy.

Cheers Stefan,  
Benjohn
