Guys, I missed this one... Thank you for your replies... I'll check out the
code and see what works. I did end up writing a string parser but I'm now
curious to see how RegEx stands up to the task.
Cheers,
Nick
On 29 July 2010 23:30, Oleg Sivokon wrote:
>
>
> Ouch, actually, it has a flaw, bu
Ouch, actually, it has a flaw, but I'm not sure you need a fix for that, but
it's possible to fix it, if you want. It only checks for the double quotes,
when it checks for the non-quoted words, but it checks for both single and
double quoted groups of words. If you need both single and double quote
Sorry to chum in :)
var re:RegExp = /(("|').*(?=\2)\2)|(\s[^\s"]+(?!\s"))/g;
var text:String = .toString();
var result:Object;
while (result = re.exec(text))
{
trace(result[0]);
}
p://keithreinfeld.home.comcast.net/>
http://keithreinfeld.home.comcast.net
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Nick Middleweek
Sent: Wednesday, July 28, 2010 12:20 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to split a String on spaces but in
Hi,
I haven't been able to work out regex yet so apart from looping and parsing
a string manually, is there anyway of parsing the following string...
flex "action script" parse string function
into the following Array...
[0] = flex
[1] = action script
[2] = parse
[3] = string
[4] = function
T
5 matches
Mail list logo