# Pattern based substitution

**URL:** <https://www.ruby-forum.com/t/pattern-based-substitution/72363>\
**Category:** Ruby\
**Created:** [October 16, 2006, 7:17pm UTC](https://www.ruby-forum.com/t/pattern-based-substitution/72363 "2006-10-16T19:17:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danmcb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Post date:** [October 16, 2006, 7:17pm UTC](https://www.ruby-forum.com/t/pattern-based-substitution/72363/1 "2006-10-16T19:17:26Z")

</div>

How does pattern based substitution works ?

For example, how does textilize replace all occurrences of _hello world_  
with **hello world**?

Thanks
