# .match in for condition

**URL:** <https://www.ruby-forum.com/t/match-in-for-condition/112502>\
**Category:** Rails\
**Created:** [August 20, 2007, 11:15am UTC](https://www.ruby-forum.com/t/match-in-for-condition/112502 "2007-08-20T11:15:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [August 20, 2007, 11:15am UTC](https://www.ruby-forum.com/t/match-in-for-condition/112502/1 "2007-08-20T11:15:37Z")

</div>

Hello frnds

I want to give .match condition in the for loop. wat i want to do is  
that i want to display only those contents with matched with the .match  
criteria.

Thanks

Dhaval P.

---

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [October 10, 2007, 11:00am UTC](https://www.ruby-forum.com/t/match-in-for-condition/112502/2 "2007-10-10T11:00:48Z")

</div>

can anyone tell me …i want to write .match condition in controller how  
can i do so??

---

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [October 11, 2007, 7:40am UTC](https://www.ruby-forum.com/t/match-in-for-condition/112502/3 "2007-10-11T07:40:03Z")

</div>

Dhaval P. wrote:

> can anyone tell me …i want to write .match condition in controller how  
> can i do so??

Be more specific.

–  
Michael W.

---

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [October 24, 2007, 6:39pm UTC](https://www.ruby-forum.com/t/match-in-for-condition/112502/4 "2007-10-24T18:39:12Z")

</div>

Please help me out.still not able to solve the problem

---

<div class="post-metadata">

**Author:** ![dhaval\_parikh33](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Post date:** [October 11, 2007, 11:16am UTC](https://www.ruby-forum.com/t/match-in-for-condition/112502/5 "2007-10-11T11:16:47Z")

</div>

hi

i want to create a method in controller which will fetch only email  
addresses from a given content (stored in the database)…and that  
fetched email I want to store in other table…can you tell me how to do  
that?

Hope you got the exact requirement
