# String returns

**URL:** <https://www.ruby-forum.com/t/string-returns/153703>\
**Category:** Rails\
**Created:** [November 20, 2008, 10:10am UTC](https://www.ruby-forum.com/t/string-returns/153703 "2008-11-20T10:10:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![palani](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed655f/32.png) [@palani](https://www.ruby-forum.com/u/palani)\
**Post date:** [November 20, 2008, 10:10am UTC](https://www.ruby-forum.com/t/string-returns/153703/1 "2008-11-20T10:10:40Z")

</div>

Hi,  
my output String is =\>contact(name).From this output, i want to do  
is get “name” alone from the output.How can i achieve this can anyone  
please tell me

---

<div class="post-metadata">

**Author:** ![palani](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed655f/32.png) [@palani](https://www.ruby-forum.com/u/palani)\
**Post date:** [November 21, 2008, 4:46am UTC](https://www.ruby-forum.com/t/string-returns/153703/2 "2008-11-21T04:46:40Z")

</div>

Palani K. wrote:

> Hi,  
> my output String is =\>contact(name).From this output, i want to do  
> is get “name” alone from the output.How can i achieve this can anyone  
> please tell me

output =~ /(\w+)/  
name=$&
