# Re: How do I strip off the extra double quote or white space

**URL:** <https://www.ruby-forum.com/t/re-how-do-i-strip-off-the-extra-double-quote-or-white-space/66320>\
**Category:** Ruby\
**Created:** [August 24, 2006, 7:40pm UTC](https://www.ruby-forum.com/t/re-how-do-i-strip-off-the-extra-double-quote-or-white-space/66320 "2006-08-24T19:40:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ban\_Hoang](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9fc348/32.png) [@Ban\_Hoang](https://www.ruby-forum.com/u/Ban_Hoang)\
**Post date:** [August 24, 2006, 7:40pm UTC](https://www.ruby-forum.com/t/re-how-do-i-strip-off-the-extra-double-quote-or-white-space/66320/1 "2006-08-24T19:40:41Z")

</div>

This is what I got for the second array when comparing: It was not  
recognize separate element to put the double quote for each…

1. Failure:

test\_\_02\_DropDown\_list\_verified(TC\_pulldownBoxVerified)  
[Assert\_equal\_From\_File.rb:55]:

\<[“Action Items :::::::::::::::::: Open Alarms Groomer Alarms Warnings  
Dead Hardware Dead Channels\n”]\> expected but was

\<[“Action Items”,

“::::::::::::::::::”,

“Open Alarms”,

“Groomer Alarms”,

“Warnings”,

“Dead Hardware”,

“Dead Channels”]\>.

2 tests, 1 assertions, 1 failures, 0 errors

> Exit code: 1

* * *

From: Ban Hoang [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)]  
Sent: Thursday, August 24, 2006 10:07 AM  
To: ruby-talk ML  
Subject: Re: How do I strip off the extra double quote or white space in  
the string when using assert\_equal method

Hi Ben,

You are exactly correct: "it’s adding it as a single

element instead of two, as you want."

It is my main problem: if the second line array[1] has 7 elements, it’s  
still adding as a single element? How do I fix it?

If I use assert\_equal and put the details for each element in the assert  
method and compare directly. It works OK (please look at Assert\_equalOK  
attached file).

If I try to use external cvs file, it has the problem and can not  
separate the link detail as different element! I attached the csv file  
and the my assert\_equal\_from\_File for you to review.

Thanks a lot for your help,

Ban
