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/197222280/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/197222280/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


--
Matt Perkins
--------------------
http://www.nudoru.com

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

Reply via email to