That would be: var re:RegExp = new RegExp("^" + userString); _siteXML..*.( re.test( attribute("name")));
Note: I simplified the regex a little bit. The .* at the end is redundant, and I removed the [] because /^New/ is different than /^[New]/ and the first seems more like what you want. The first matches any string beginning with "New", and the later matches any string beginning with any of the following characters: "N", "e", "w". You too, go read that book I mentioned in a thread yesterday! ;) On Fri, Jul 18, 2008 at 1:45 PM, Pavel Krůšek <[EMAIL PROTECTED]> wrote: > Hi List, > > this code work fine for me, successfully return all records with attribute > with first letter "N": > > _siteXML..*.( /^[N].*/.test( attribute("name"))); > > but i don't know, how integrate this code with user input (from input > textfield) - for example user entered string "New". > > Please help :) > > thanks > > > Pavel > > > > _______________________________________________ > 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