Re: More Java Than WebObjects
Re: More Java Than WebObjects
- Subject: Re: More Java Than WebObjects
- From: "Jonathan Fleming" <email@hidden>
- Date: Fri, 11 Jun 2004 16:39:33 +0100
From: Nathan Dumar <email@hidden>
To: Jonathan Fleming <email@hidden>
Subject: Re: More Java Than WebObjects
Date: Fri, 11 Jun 2004 09:59:04 -0400
If the real list is just like the list here, you could count the commas
instead, and get the same number.
Yeah Nathan, but the user may not always supply the commas (afterthought:
unless I supply the commas for the user) and if they only supply an open or
closed quotation mark the counter would count the spaces in what was meant
to be a phrase (effectively one word) therefore making the validation much
tighter. If the quotations are closed, on-the-other-hand, then I need to
skip the spaces in the quotations to count this as one word and since you
have to always provide a space for a new word it seems the way to go.
If anyone has a brillant or elegant way of doing what I am trying to do,
please reply with some code example.
Kind regards
Jonathan :^)
Nathan
On Jun 11, 2004, at 7:17 AM, Jonathan Fleming wrote:
What's the best way to write code that will count the spaces between each
word but not prases that are sourounded by double quotation marks eg.
there are 2 phrases in the example below making up a total of 6 words (6
spaces), but how can avoid counting the spaces in the phrases?:
walls, plumbing, "painting & decorating", decorating, "concrete mixing
truck", concreting, bricklayers
This is the code I have so far:
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.