# Re: $ anchor for string of a whole file

**URL:** <https://www.ruby-forum.com/t/re-anchor-for-string-of-a-whole-file/70495>\
**Category:** Ruby\
**Created:** [September 29, 2006, 6:01pm UTC](https://www.ruby-forum.com/t/re-anchor-for-string-of-a-whole-file/70495 "2006-09-29T18:01:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![phrogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/2acd7d/32.png) [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Post date:** [September 29, 2006, 6:01pm UTC](https://www.ruby-forum.com/t/re-anchor-for-string-of-a-whole-file/70495/1 "2006-09-29T18:01:08Z")

</div>

> Because I’ve read in an entire file as one string into memory,  
> shouldn’t $ mean the end of the file? And, shouldn’t /m tell it to  
> include everying, including newlines?

[http://phrogz.net/ProgrammingRuby/language.html#regularexpressions](http://phrogz.net/ProgrammingRuby/language.html#regularexpressions)  
See \z and \Z
