RE: [Flashcoders] How to handle String the best way

2010-07-23 Thread Cor
Thanks Steven!

Regards
Cor

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks
Sent: donderdag 22 juli 2010 23:43
To: Flash Coders List
Subject: Re: [Flashcoders] How to handle String the best way

http://www.regular-expressions.info/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com 
Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van uitgifte: 07/21/10
20:36:00

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] How to handle String the best way

2010-07-23 Thread Cor
I found this one, so maybe you are interested too:

http://lawrence.ecorp.net/inet/samples/regexp-intro.php


-Original Message-
Sent: donderdag 22 juli 2010 23:43
To: Flash Coders List
Subject: Re: [Flashcoders] How to handle String the best way

http://www.regular-expressions.info/
___

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] How to handle String the best way

2010-07-22 Thread David Hunter

Not entirely sure if i understand what you want to do, but you could use a 
regular expression to strip out any punctuation or unwanted characters. 
String.split() breaks a string into an array of strings by using a specified 
delimiter which could be a   space in this situation, so each word is an 
element in an array. 
Apply this process to both your strings and you end up with two arrays which 
should be easy to compare words and cycle through all the elements.  Hope that 
helps, but I've probably misunderstood what you want to do! David

 From: c...@chello.nl
 To: flashcoders@chattyfig.figleaf.com
 Date: Thu, 22 Jul 2010 09:46:58 +0200
 Subject: [Flashcoders] How to handle String the best way
 
 Hi List,
 
 I am trying to find how to best compare 2 strings(word by word).
 I have 2 texts, one fully written and one abbreviated.
 The texts have exactly the same amount of words and they are in the same
 order.
 So in the text field one word is highlighted. 
 The user has to fill in the abbreviation of the text(word by word).
 The user fills in his translation and ENTERS to confirm.
 And then the app has to compare the words.
 
 He can choose to practice from abbreviation to fully written words or vice
 versa.
 
 So what is the best way to do this, keeping in mind that special characters
 (like .,:;! space) must not be judged.
 
 Any idea is welcome.
 
 TIA
 Cor
 
  
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us 
now___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] How to handle String the best way

2010-07-22 Thread Cor
Thanks David.

I think you understood exactly what I want.
The String.split() was also what I had in mind, but I don't know how to do a
regular expression to strip out any punctuation or unwanted characters.

Do you have an example of such action?

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter
Sent: donderdag 22 juli 2010 14:50
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] How to handle String the best way


Not entirely sure if i understand what you want to do, but you could use a
regular expression to strip out any punctuation or unwanted characters.
String.split() breaks a string into an array of strings by using a specified
delimiter which could be a   space in this situation, so each word is an
element in an array. 
Apply this process to both your strings and you end up with two arrays which
should be easy to compare words and cycle through all the elements.  Hope
that helps, but I've probably misunderstood what you want to do! David

 From: c...@chello.nl
 To: flashcoders@chattyfig.figleaf.com
 Date: Thu, 22 Jul 2010 09:46:58 +0200
 Subject: [Flashcoders] How to handle String the best way
 
 Hi List,
 
 I am trying to find how to best compare 2 strings(word by word).
 I have 2 texts, one fully written and one abbreviated.
 The texts have exactly the same amount of words and they are in the same
 order.
 So in the text field one word is highlighted. 
 The user has to fill in the abbreviation of the text(word by word).
 The user fills in his translation and ENTERS to confirm.
 And then the app has to compare the words.
 
 He can choose to practice from abbreviation to fully written words or vice
 versa.
 
 So what is the best way to do this, keeping in mind that special
characters
 (like .,:;! space) must not be judged.
 
 Any idea is welcome.
 
 TIA
 Cor
 
  
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us
now___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com 
Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van uitgifte: 07/21/10
20:36:00

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to handle String the best way

2010-07-22 Thread Matt S.
Can you give us two actual String samples, of text A and text B, that
you're trying to compare?

.m

On Thu, Jul 22, 2010 at 3:46 AM, Cor c...@chello.nl wrote:
 Hi List,

 I am trying to find how to best compare 2 strings(word by word).
 I have 2 texts, one fully written and one abbreviated.
 The texts have exactly the same amount of words and they are in the same
 order.
 So in the text field one word is highlighted.
 The user has to fill in the abbreviation of the text(word by word).
 The user fills in his translation and ENTERS to confirm.
 And then the app has to compare the words.

 He can choose to practice from abbreviation to fully written words or vice
 versa.

 So what is the best way to do this, keeping in mind that special characters
 (like .,:;! space) must not be judged.

 Any idea is welcome.

 TIA
 Cor



 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to handle String the best way

2010-07-22 Thread Glen Pike

Hi,

Something like /(\w)+)/gi or /([a-zA-Z])+/gi if you are being strict on 
just having letters.  You can experiment with Grant Skinners RegExr tool 
- Google that cos I have no link :)


Glen

On 22/07/2010 14:10, Cor wrote:

Thanks David.

I think you understood exactly what I want.
The String.split() was also what I had in mind, but I don't know how to do a
regular expression to strip out any punctuation or unwanted characters.

Do you have an example of such action?

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter
Sent: donderdag 22 juli 2010 14:50
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] How to handle String the best way


Not entirely sure if i understand what you want to do, but you could use a
regular expression to strip out any punctuation or unwanted characters.
String.split() breaks a string into an array of strings by using a specified
delimiter which could be a   space in this situation, so each word is an
element in an array.
Apply this process to both your strings and you end up with two arrays which
should be easy to compare words and cycle through all the elements.  Hope
that helps, but I've probably misunderstood what you want to do! David

   

From: c...@chello.nl
To: flashcoders@chattyfig.figleaf.com
Date: Thu, 22 Jul 2010 09:46:58 +0200
Subject: [Flashcoders] How to handle String the best way

Hi List,

I am trying to find how to best compare 2 strings(word by word).
I have 2 texts, one fully written and one abbreviated.
The texts have exactly the same amount of words and they are in the same
order.
So in the text field one word is highlighted.
The user has to fill in the abbreviation of the text(word by word).
The user fills in his translation and ENTERS to confirm.
And then the app has to compare the words.

He can choose to practice from abbreviation to fully written words or vice
versa.

So what is the best way to do this, keeping in mind that special
 

characters
   

(like .,:;! space) must not be judged.

Any idea is welcome.

TIA
Cor



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 


_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us
now___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van uitgifte: 07/21/10
20:36:00

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


   


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] How to handle String the best way

2010-07-22 Thread Cor
I can't publish the actual strings, because they contain military issues.
So I will have to create some fake strings.

But mainly every full text (our max is 800 characters) can be used and every
abbreviation can be 'fake', like the this:

Full:
These words are the text at its full length. I will write a second sentence
here!

Short:
These wrds are txt at its f len. I will wr a sec sent here!

One thing to know is that in military abbreviation, we do not use dots like
in normal writing.



-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S.
Sent: donderdag 22 juli 2010 15:16
To: Flash Coders List
Subject: Re: [Flashcoders] How to handle String the best way

Can you give us two actual String samples, of text A and text B, that
you're trying to compare?

.m

On Thu, Jul 22, 2010 at 3:46 AM, Cor c...@chello.nl wrote:
 Hi List,

 I am trying to find how to best compare 2 strings(word by word).
 I have 2 texts, one fully written and one abbreviated.
 The texts have exactly the same amount of words and they are in the same
 order.
 So in the text field one word is highlighted.
 The user has to fill in the abbreviation of the text(word by word).
 The user fills in his translation and ENTERS to confirm.
 And then the app has to compare the words.

 He can choose to practice from abbreviation to fully written words or vice
 versa.

 So what is the best way to do this, keeping in mind that special
characters
 (like .,:;! space) must not be judged.

 Any idea is welcome.

 TIA
 Cor



 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com 
Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van uitgifte: 07/21/10
20:36:00

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to handle String the best way

2010-07-22 Thread Matt S.
In the end though, aren't you really checking each answer not against
the abbreviation but against a correct answer, eg if the abbreviation
is:

sec

and the correct answer is

second

and the user writes

section

as their answer, that would be incorrect. But if you compared sec to
section, you will still get a match on the letters for sec/sec. So
wouldnt you still need to tie the correct answer to the abbreviation,
and compare the users response to that, in other words skip over the
abbreviation and compare the answer to the correct word that's tied to
the abbreviation?

I'm probably completely misunderstanding what you're trying to do :)

.m

.m

On Thu, Jul 22, 2010 at 9:36 AM, Cor c...@chello.nl wrote:
 I can't publish the actual strings, because they contain military issues.
 So I will have to create some fake strings.

 But mainly every full text (our max is 800 characters) can be used and every
 abbreviation can be 'fake', like the this:

 Full:
 These words are the text at its full length. I will write a second sentence
 here!

 Short:
 These wrds are txt at its f len. I will wr a sec sent here!

 One thing to know is that in military abbreviation, we do not use dots like
 in normal writing.



 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S.
 Sent: donderdag 22 juli 2010 15:16
 To: Flash Coders List
 Subject: Re: [Flashcoders] How to handle String the best way

 Can you give us two actual String samples, of text A and text B, that
 you're trying to compare?

 .m

 On Thu, Jul 22, 2010 at 3:46 AM, Cor c...@chello.nl wrote:
 Hi List,

 I am trying to find how to best compare 2 strings(word by word).
 I have 2 texts, one fully written and one abbreviated.
 The texts have exactly the same amount of words and they are in the same
 order.
 So in the text field one word is highlighted.
 The user has to fill in the abbreviation of the text(word by word).
 The user fills in his translation and ENTERS to confirm.
 And then the app has to compare the words.

 He can choose to practice from abbreviation to fully written words or vice
 versa.

 So what is the best way to do this, keeping in mind that special
 characters
 (like .,:;! space) must not be judged.

 Any idea is welcome.

 TIA
 Cor



 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 Geen virus gevonden in het binnenkomende-bericht.
 Gecontroleerd door AVG - www.avg.com
 Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van uitgifte: 07/21/10
 20:36:00

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] How to handle String the best way

2010-07-22 Thread Cor
That is correct.
The users are offered a long text and they have to rewrite this to a
correct abbreviated text.

In the Army, we have about a million abbreviations (or acronyms?) which are
used in every written text.
Our officers have to able to read and write this without the possibility to
look it up in a military dictionary.
And, you can imagine they are not allowed to make mistakes, because that
might result in shooting in the wrong direction, or worse.



-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S.
Sent: donderdag 22 juli 2010 15:50
To: Flash Coders List
Subject: Re: [Flashcoders] How to handle String the best way

In the end though, aren't you really checking each answer not against
the abbreviation but against a correct answer, eg if the abbreviation
is:

sec

and the correct answer is

second

and the user writes

section

as their answer, that would be incorrect. But if you compared sec to
section, you will still get a match on the letters for sec/sec. So
wouldnt you still need to tie the correct answer to the abbreviation,
and compare the users response to that, in other words skip over the
abbreviation and compare the answer to the correct word that's tied to
the abbreviation?

I'm probably completely misunderstanding what you're trying to do :)

.m

.m

On Thu, Jul 22, 2010 at 9:36 AM, Cor c...@chello.nl wrote:
 I can't publish the actual strings, because they contain military issues.
 So I will have to create some fake strings.

 But mainly every full text (our max is 800 characters) can be used and
every
 abbreviation can be 'fake', like the this:

 Full:
 These words are the text at its full length. I will write a second
sentence
 here!

 Short:
 These wrds are txt at its f len. I will wr a sec sent here!

 One thing to know is that in military abbreviation, we do not use dots
like
 in normal writing.



 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Matt S.
 Sent: donderdag 22 juli 2010 15:16
 To: Flash Coders List
 Subject: Re: [Flashcoders] How to handle String the best way

 Can you give us two actual String samples, of text A and text B, that
 you're trying to compare?

 .m

 On Thu, Jul 22, 2010 at 3:46 AM, Cor c...@chello.nl wrote:
 Hi List,

 I am trying to find how to best compare 2 strings(word by word).
 I have 2 texts, one fully written and one abbreviated.
 The texts have exactly the same amount of words and they are in the same
 order.
 So in the text field one word is highlighted.
 The user has to fill in the abbreviation of the text(word by word).
 The user fills in his translation and ENTERS to confirm.
 And then the app has to compare the words.

 He can choose to practice from abbreviation to fully written words or
vice
 versa.

 So what is the best way to do this, keeping in mind that special
 characters
 (like .,:;! space) must not be judged.

 Any idea is welcome.

 TIA
 Cor



 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 Geen virus gevonden in het binnenkomende-bericht.
 Gecontroleerd door AVG - www.avg.com
 Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van uitgifte:
07/21/10
 20:36:00

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com 
Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van uitgifte: 07/21/10
20:36:00

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] How to handle String the best way

2010-07-22 Thread David Hunter

String.replace() then a regular expression like /[,\.!\?:;\\\/]/g and replace 
it with nothing: . You'll probably want to check which characters to remove 
but remember to use an escape slash for certain characters. Haven't tried it 
but there are some examples and lots of help in the docs and more online. not 
that knowledgeable on regular expressions to be honest.

 From: c...@chello.nl
 To: flashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] How to handle String the best way
 Date: Thu, 22 Jul 2010 15:10:46 +0200
 
 Thanks David.
 
 I think you understood exactly what I want.
 The String.split() was also what I had in mind, but I don't know how to do a
 regular expression to strip out any punctuation or unwanted characters.
 
 Do you have an example of such action?
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter
 Sent: donderdag 22 juli 2010 14:50
 To: flashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] How to handle String the best way
 
 
 Not entirely sure if i understand what you want to do, but you could use a
 regular expression to strip out any punctuation or unwanted characters.
 String.split() breaks a string into an array of strings by using a specified
 delimiter which could be a   space in this situation, so each word is an
 element in an array. 
 Apply this process to both your strings and you end up with two arrays which
 should be easy to compare words and cycle through all the elements.  Hope
 that helps, but I've probably misunderstood what you want to do! David
 
  From: c...@chello.nl
  To: flashcoders@chattyfig.figleaf.com
  Date: Thu, 22 Jul 2010 09:46:58 +0200
  Subject: [Flashcoders] How to handle String the best way
  
  Hi List,
  
  I am trying to find how to best compare 2 strings(word by word).
  I have 2 texts, one fully written and one abbreviated.
  The texts have exactly the same amount of words and they are in the same
  order.
  So in the text field one word is highlighted. 
  The user has to fill in the abbreviation of the text(word by word).
  The user fills in his translation and ENTERS to confirm.
  And then the app has to compare the words.
  
  He can choose to practice from abbreviation to fully written words or vice
  versa.
  
  So what is the best way to do this, keeping in mind that special
 characters
  (like .,:;! space) must not be judged.
  
  Any idea is welcome.
  
  TIA
  Cor
  
   
  
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 _
 http://clk.atdmt.com/UKM/go/19780/direct/01/
 Do you have a story that started on Hotmail? Tell us
 now___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 Geen virus gevonden in het binnenkomende-bericht.
 Gecontroleerd door AVG - www.avg.com 
 Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van uitgifte: 07/21/10
 20:36:00
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us 
now___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] How to handle String the best way

2010-07-22 Thread Cor
Thanks again David.

RegExp are a bit scary for me too. :-)



-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David Hunter
Sent: donderdag 22 juli 2010 21:14
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] How to handle String the best way


String.replace() then a regular expression like /[,\.!\?:;\\\/]/g and
replace it with nothing: . You'll probably want to check which characters
to remove but remember to use an escape slash for certain characters.
Haven't tried it but there are some examples and lots of help in the docs
and more online. not that knowledgeable on regular expressions to be honest.

 From: c...@chello.nl
 To: flashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] How to handle String the best way
 Date: Thu, 22 Jul 2010 15:10:46 +0200
 
 Thanks David.
 
 I think you understood exactly what I want.
 The String.split() was also what I had in mind, but I don't know how to do
a
 regular expression to strip out any punctuation or unwanted characters.
 
 Do you have an example of such action?
 
 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David
Hunter
 Sent: donderdag 22 juli 2010 14:50
 To: flashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] How to handle String the best way
 
 
 Not entirely sure if i understand what you want to do, but you could use a
 regular expression to strip out any punctuation or unwanted characters.
 String.split() breaks a string into an array of strings by using a
specified
 delimiter which could be a   space in this situation, so each word is an
 element in an array. 
 Apply this process to both your strings and you end up with two arrays
which
 should be easy to compare words and cycle through all the elements.  Hope
 that helps, but I've probably misunderstood what you want to do! David
 
  From: c...@chello.nl
  To: flashcoders@chattyfig.figleaf.com
  Date: Thu, 22 Jul 2010 09:46:58 +0200
  Subject: [Flashcoders] How to handle String the best way
  
  Hi List,
  
  I am trying to find how to best compare 2 strings(word by word).
  I have 2 texts, one fully written and one abbreviated.
  The texts have exactly the same amount of words and they are in the same
  order.
  So in the text field one word is highlighted. 
  The user has to fill in the abbreviation of the text(word by word).
  The user fills in his translation and ENTERS to confirm.
  And then the app has to compare the words.
  
  He can choose to practice from abbreviation to fully written words or
vice
  versa.
  
  So what is the best way to do this, keeping in mind that special
 characters
  (like .,:;! space) must not be judged.
  
  Any idea is welcome.
  
  TIA
  Cor
  
   
  
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 _
 http://clk.atdmt.com/UKM/go/19780/direct/01/
 Do you have a story that started on Hotmail? Tell us
 now___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 Geen virus gevonden in het binnenkomende-bericht.
 Gecontroleerd door AVG - www.avg.com 
 Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van uitgifte:
07/21/10
 20:36:00
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us
now___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com 
Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van uitgifte: 07/21/10
20:36:00

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to handle String the best way

2010-07-22 Thread Karl DeSaulniers

Hi guys,
Sorry to barge in, but I found this site to be helpful with RegExp.
Might help you too. Its in javascript, but found it easily translated  
into AS.


http://lawrence.ecorp.net/inet/samples/regexp-intro.php

Best,

Karl


On Jul 22, 2010, at 2:37 PM, Cor wrote:


Thanks again David.

RegExp are a bit scary for me too. :-)



-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of  
David Hunter

Sent: donderdag 22 juli 2010 21:14
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] How to handle String the best way


String.replace() then a regular expression like /[,\.!\?:;\\\/]/g and
replace it with nothing: . You'll probably want to check which  
characters

to remove but remember to use an escape slash for certain characters.
Haven't tried it but there are some examples and lots of help in  
the docs
and more online. not that knowledgeable on regular expressions to  
be honest.



From: c...@chello.nl
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] How to handle String the best way
Date: Thu, 22 Jul 2010 15:10:46 +0200

Thanks David.

I think you understood exactly what I want.
The String.split() was also what I had in mind, but I don't know  
how to do

a
regular expression to strip out any punctuation or unwanted  
characters.


Do you have an example of such action?

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David

Hunter

Sent: donderdag 22 juli 2010 14:50
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] How to handle String the best way


Not entirely sure if i understand what you want to do, but you  
could use a
regular expression to strip out any punctuation or unwanted  
characters.

String.split() breaks a string into an array of strings by using a

specified
delimiter which could be a   space in this situation, so each  
word is an

element in an array.
Apply this process to both your strings and you end up with two  
arrays

which
should be easy to compare words and cycle through all the  
elements.  Hope
that helps, but I've probably misunderstood what you want to do!  
David



From: c...@chello.nl
To: flashcoders@chattyfig.figleaf.com
Date: Thu, 22 Jul 2010 09:46:58 +0200
Subject: [Flashcoders] How to handle String the best way

Hi List,

I am trying to find how to best compare 2 strings(word by word).
I have 2 texts, one fully written and one abbreviated.
The texts have exactly the same amount of words and they are in  
the same

order.
So in the text field one word is highlighted.
The user has to fill in the abbreviation of the text(word by word).
The user fills in his translation and ENTERS to confirm.
And then the app has to compare the words.

He can choose to practice from abbreviation to fully written  
words or

vice

versa.

So what is the best way to do this, keeping in mind that special

characters

(like .,:;! space) must not be judged.

Any idea is welcome.

TIA
Cor



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us
now___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van uitgifte:

07/21/10

20:36:00

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us
now___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van uitgifte:  
07/21/10

20:36:00

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Karl DeSaulniers
Design Drumm
http://designdrumm.com

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to handle String the best way

2010-07-22 Thread Matt Perkins

Grant Skinner has a great tool for building and testing RegEx
http://gskinner.com/RegExr/

I've used it a lot lately - i'm new to RegEx and this makes it a lot 
less intimidating!



On 7/22/2010 3:54 PM, Karl DeSaulniers wrote:

Hi guys,
Sorry to barge in, but I found this site to be helpful with RegExp.
Might help you too. Its in javascript, but found it easily translated 
into AS.


http://lawrence.ecorp.net/inet/samples/regexp-intro.php

Best,

Karl


On Jul 22, 2010, at 2:37 PM, Cor wrote:


Thanks again David.

RegExp are a bit scary for me too. :-)



-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David 
Hunter

Sent: donderdag 22 juli 2010 21:14
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] How to handle String the best way


String.replace() then a regular expression like /[,\.!\?:;\\\/]/g and
replace it with nothing: . You'll probably want to check which 
characters

to remove but remember to use an escape slash for certain characters.
Haven't tried it but there are some examples and lots of help in the 
docs
and more online. not that knowledgeable on regular expressions to be 
honest.



From: c...@chello.nl
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] How to handle String the best way
Date: Thu, 22 Jul 2010 15:10:46 +0200

Thanks David.

I think you understood exactly what I want.
The String.split() was also what I had in mind, but I don't know how 
to do

a

regular expression to strip out any punctuation or unwanted characters.

Do you have an example of such action?

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David

Hunter

Sent: donderdag 22 juli 2010 14:50
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] How to handle String the best way


Not entirely sure if i understand what you want to do, but you could 
use a

regular expression to strip out any punctuation or unwanted characters.
String.split() breaks a string into an array of strings by using a

specified
delimiter which could be a   space in this situation, so each word 
is an

element in an array.
Apply this process to both your strings and you end up with two arrays

which
should be easy to compare words and cycle through all the elements.  
Hope

that helps, but I've probably misunderstood what you want to do! David


From: c...@chello.nl
To: flashcoders@chattyfig.figleaf.com
Date: Thu, 22 Jul 2010 09:46:58 +0200
Subject: [Flashcoders] How to handle String the best way

Hi List,

I am trying to find how to best compare 2 strings(word by word).
I have 2 texts, one fully written and one abbreviated.
The texts have exactly the same amount of words and they are in the 
same

order.
So in the text field one word is highlighted.
The user has to fill in the abbreviation of the text(word by word).
The user fills in his translation and ENTERS to confirm.
And then the app has to compare the words.

He can choose to practice from abbreviation to fully written words or

vice

versa.

So what is the best way to do this, keeping in mind that special

characters

(like .,:;! space) must not be judged.

Any idea is welcome.

TIA
Cor



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us
now___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van uitgifte:

07/21/10

20:36:00

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us
now___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van uitgifte: 
07/21/10

20:36:00

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Karl DeSaulniers
Design Drumm
http://designdrumm.com

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http

Re: [Flashcoders] How to handle String the best way

2010-07-22 Thread Karl DeSaulniers

Ah yes. That's a great one too.

Karl

Sent from losPhone

On Jul 22, 2010, at 3:07 PM, Matt Perkins nudoru.m...@gmail.com wrote:


Grant Skinner has a great tool for building and testing RegEx
http://gskinner.com/RegExr/

I've used it a lot lately - i'm new to RegEx and this makes it a lot  
less intimidating!



On 7/22/2010 3:54 PM, Karl DeSaulniers wrote:

Hi guys,
Sorry to barge in, but I found this site to be helpful with RegExp.
Might help you too. Its in javascript, but found it easily  
translated into AS.


http://lawrence.ecorp.net/inet/samples/regexp-intro.php

Best,

Karl


On Jul 22, 2010, at 2:37 PM, Cor wrote:


Thanks again David.

RegExp are a bit scary for me too. :-)



-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of  
David Hunter

Sent: donderdag 22 juli 2010 21:14
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] How to handle String the best way


String.replace() then a regular expression like /[,\.!\?:;\\\/]/g  
and
replace it with nothing: . You'll probably want to check which  
characters
to remove but remember to use an escape slash for certain  
characters.
Haven't tried it but there are some examples and lots of help in  
the docs
and more online. not that knowledgeable on regular expressions to  
be honest.



From: c...@chello.nl
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] How to handle String the best way
Date: Thu, 22 Jul 2010 15:10:46 +0200

Thanks David.

I think you understood exactly what I want.
The String.split() was also what I had in mind, but I don't know  
how to do

a
regular expression to strip out any punctuation or unwanted  
characters.


Do you have an example of such action?

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of  
David

Hunter

Sent: donderdag 22 juli 2010 14:50
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] How to handle String the best way


Not entirely sure if i understand what you want to do, but you  
could use a
regular expression to strip out any punctuation or unwanted  
characters.

String.split() breaks a string into an array of strings by using a

specified
delimiter which could be a   space in this situation, so each  
word is an

element in an array.
Apply this process to both your strings and you end up with two  
arrays

which
should be easy to compare words and cycle through all the  
elements.  Hope
that helps, but I've probably misunderstood what you want to do!  
David



From: c...@chello.nl
To: flashcoders@chattyfig.figleaf.com
Date: Thu, 22 Jul 2010 09:46:58 +0200
Subject: [Flashcoders] How to handle String the best way

Hi List,

I am trying to find how to best compare 2 strings(word by word).
I have 2 texts, one fully written and one abbreviated.
The texts have exactly the same amount of words and they are in  
the same

order.
So in the text field one word is highlighted.
The user has to fill in the abbreviation of the text(word by  
word).

The user fills in his translation and ENTERS to confirm.
And then the app has to compare the words.

He can choose to practice from abbreviation to fully written  
words or

vice

versa.

So what is the best way to do this, keeping in mind that special

characters

(like .,:;! space) must not be judged.

Any idea is welcome.

TIA
Cor



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us
now___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van uitgifte:

07/21/10

20:36:00

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_
http://clk.atdmt.com/UKM/go/19780/direct/01/
Do you have a story that started on Hotmail? Tell us
now___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van  
uitgifte: 07/21/10

20:36:00

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Karl

Re: [Flashcoders] How to handle String the best way

2010-07-22 Thread Taka Kojima
Seeing as you have specific abbreviations, I don't understand why Regular
Expressions are entering into this.

You should have the abbreviations and their actual words stored in a
database (maybe an XML doc somewhere), then just compare each one, one a
word to abbreviation basis.

Regular Expressions are not going to work in this scenario unless there are
very specific rules that all possible use cases can conform to.



On Thu, Jul 22, 2010 at 1:28 PM, Karl DeSaulniers k...@designdrumm.comwrote:

 Ah yes. That's a great one too.

 Karl

 Sent from losPhone


 On Jul 22, 2010, at 3:07 PM, Matt Perkins nudoru.m...@gmail.com wrote:

  Grant Skinner has a great tool for building and testing RegEx
 http://gskinner.com/RegExr/

 I've used it a lot lately - i'm new to RegEx and this makes it a lot less
 intimidating!


 On 7/22/2010 3:54 PM, Karl DeSaulniers wrote:

 Hi guys,
 Sorry to barge in, but I found this site to be helpful with RegExp.
 Might help you too. Its in javascript, but found it easily translated
 into AS.

 http://lawrence.ecorp.net/inet/samples/regexp-intro.php

 Best,

 Karl


 On Jul 22, 2010, at 2:37 PM, Cor wrote:

  Thanks again David.

 RegExp are a bit scary for me too. :-)



 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David
 Hunter
 Sent: donderdag 22 juli 2010 21:14
 To: flashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] How to handle String the best way


 String.replace() then a regular expression like /[,\.!\?:;\\\/]/g and
 replace it with nothing: . You'll probably want to check which
 characters
 to remove but remember to use an escape slash for certain characters.
 Haven't tried it but there are some examples and lots of help in the
 docs
 and more online. not that knowledgeable on regular expressions to be
 honest.

  From: c...@chello.nl
 To: flashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] How to handle String the best way
 Date: Thu, 22 Jul 2010 15:10:46 +0200

 Thanks David.

 I think you understood exactly what I want.
 The String.split() was also what I had in mind, but I don't know how to
 do

 a

 regular expression to strip out any punctuation or unwanted characters.

 Do you have an example of such action?

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of David

 Hunter

 Sent: donderdag 22 juli 2010 14:50
 To: flashcoders@chattyfig.figleaf.com
 Subject: RE: [Flashcoders] How to handle String the best way


 Not entirely sure if i understand what you want to do, but you could
 use a
 regular expression to strip out any punctuation or unwanted characters.
 String.split() breaks a string into an array of strings by using a

 specified

 delimiter which could be a   space in this situation, so each word is
 an
 element in an array.
 Apply this process to both your strings and you end up with two arrays

 which

 should be easy to compare words and cycle through all the elements.
  Hope
 that helps, but I've probably misunderstood what you want to do! David

  From: c...@chello.nl
 To: flashcoders@chattyfig.figleaf.com
 Date: Thu, 22 Jul 2010 09:46:58 +0200
 Subject: [Flashcoders] How to handle String the best way

 Hi List,

 I am trying to find how to best compare 2 strings(word by word).
 I have 2 texts, one fully written and one abbreviated.
 The texts have exactly the same amount of words and they are in the
 same
 order.
 So in the text field one word is highlighted.
 The user has to fill in the abbreviation of the text(word by word).
 The user fills in his translation and ENTERS to confirm.
 And then the app has to compare the words.

 He can choose to practice from abbreviation to fully written words or

 vice

 versa.

 So what is the best way to do this, keeping in mind that special

 characters

 (like .,:;! space) must not be judged.

 Any idea is welcome.

 TIA
 Cor



 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


 _
 http://clk.atdmt.com/UKM/go/19780/direct/01/
 Do you have a story that started on Hotmail? Tell us
 now___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 Geen virus gevonden in het binnenkomende-bericht.
 Gecontroleerd door AVG - www.avg.com
 Versie: 9.0.851 / Virusdatabase: 271.1.1/3020 - datum van uitgifte:

 07/21/10

 20:36:00

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


 _
 http://clk.atdmt.com/UKM/go/19780/direct/01/
 Do you have

Re: [Flashcoders] How to handle String the best way

2010-07-22 Thread Matt S.
Yeah that was my question, albeit expressed in a much more convoluted
way. In the end its just a right/wrong quiz.

.m

On Thu, Jul 22, 2010 at 4:42 PM, Taka Kojima t...@gigafied.com wrote:
 Seeing as you have specific abbreviations, I don't understand why Regular
 Expressions are entering into this.

 You should have the abbreviations and their actual words stored in a
 database (maybe an XML doc somewhere), then just compare each one, one a
 word to abbreviation basis.

 Regular Expressions are not going to work in this scenario unless there are
 very specific rules that all possible use cases can conform to.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] How to handle String the best way

2010-07-22 Thread David Hunter

i think the regular expression is to strip out unwanted characters like 
punctuation. comparing strings would be done by another process.

 From: mattsp...@gmail.com
 Date: Thu, 22 Jul 2010 16:51:03 -0400
 Subject: Re: [Flashcoders] How to handle String the best way
 To: flashcoders@chattyfig.figleaf.com
 
 Yeah that was my question, albeit expressed in a much more convoluted
 way. In the end its just a right/wrong quiz.
 
 .m
 
 On Thu, Jul 22, 2010 at 4:42 PM, Taka Kojima t...@gigafied.com wrote:
  Seeing as you have specific abbreviations, I don't understand why Regular
  Expressions are entering into this.
 
  You should have the abbreviations and their actual words stored in a
  database (maybe an XML doc somewhere), then just compare each one, one a
  word to abbreviation basis.
 
  Regular Expressions are not going to work in this scenario unless there are
  very specific rules that all possible use cases can conform to.
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
_
http://clk.atdmt.com/UKM/go/19780/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us 
now___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to handle String the best way

2010-07-22 Thread Steven Sacks

http://www.regular-expressions.info/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders