The question or the example isn't clear enough.

But for the example you gave, this works =  a.sub(/[\s\_]/,'')

Thanks & Regards,
Dhruva Sagar.



On Wed, Apr 7, 2010 at 15:25, Hemant Bhargava <[email protected]> wrote:

> Siddick Ebramsha wrote:
> > Give sample input string and output string..
>
> Hey thanks for such a quick reply..
>
> Ok lets suppose,
> Input:- :[email protected] <hemant.bhargava%[email protected]>
> Output should be as only, 
> [email protected]<hemant.bhargava%[email protected]>
>
> Means that i want to remove all extra chars except . and +.. Hope u got
> it now..
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to