Hey guys,

I'm trying to turn this "objectA.objectB.objectC" into ["objectA",
"objectB", "objectC"] using a regex, but all I seem to get using
String.match() is ["objectA", "objectC"]. Can anybody tell me what's wrong
with the following?

const multiLevelReferencePattern : RegExp =
/([a-zA-Z0-9_]+)(?:\.([a-zA-Z0-9_]+))+/;

I also tried to match into ["objectA", ".objectB", ".objectC"] by throwing
out the non-matching group and rolling the "\." into the last matching
group, but I still get the same result (only the last match comes through).

For now I've switched to a simpler regex in order to RegExp.test() the
string and then using String.explode(), but I would like to do both at once
using String.match() if possible.

Cheers,
-Josh

-- 
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

http://flex.joshmcdonald.info/

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]

Reply via email to