Advertisement

06.05.2008 at 01:47PM PDT, ID: 23461864
[x]
Attachment Details

Ruby regular expression - count piece of text in a text field

Asked by philsivyer in Ruby Scripting Language

Hello
I have a csv file (approx 20000 lines) and I want to count the number of times the following text (On Hold)appears in a given field (Col4)  Example ....
Col1,      Col2 ,    Col3,    Col4,
1234,    "abcd",  12/05/08, "This ticket place On Hold 12/05/07 and etc etc again placed on hold etc etc"
4567,   "dfghfag", 14/05/08, "aaaaa \; On Hold-----On Hold rwg///sdf on hold ffff"
when written to new file the result set will be ...
Col1      Col2      Col3     Col4
1234,   "abcd",  12/05/08,  2,
4567,   "dfghfag", 14/05/08, 3

Any help much appreciated

PhilStart Free Trial
[+][-]06.05.2008 at 02:24PM PDT, ID: 21724158

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 02:45PM PDT, ID: 21724313

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 02:48PM PDT, ID: 21724339

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 02:51PM PDT, ID: 21724365

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 08:03AM PDT, ID: 21729729

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 08:56AM PDT, ID: 21730246

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 09:05AM PDT, ID: 21730326

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 09:16AM PDT, ID: 21730412

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Ruby Scripting Language
Sign Up Now!
Solution Provided By: Gertone
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.06.2008 at 01:39PM PDT, ID: 21732517

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 01:50PM PDT, ID: 21732584

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.06.2008 at 01:54PM PDT, ID: 21732614

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 02:13PM PDT, ID: 21732747

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 02:19PM PDT, ID: 21732778

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628