Found it. In case anyone's interested. This is what I came up with: str = '<option>select a make</option><option value="Honda" selected>Honda</option><option value="Acura">Acura</option>'; re = /value="(\w+)"/i; found = str.match(re);
alert(found): returns value="Honda",Honda alert(found[1]): returns Honda -----Original Message----- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 01, 2007 2:38 PM To: CF-Talk Subject: SOT: Javascript regex question... I'm working on this myself, but wanted to throw it to the list in case someone knew it right off. I have a string: <option>select a make</option><option value="Honda" selected>Honda</option> The length of this string might vary, but I need to get the string inside the FIRST value="get this string". I know the starting char by doing this: str.indexOf('"'); which returns 44, so I know to start counting at 45, but how do I know to stop counting at char 50 (in this case)? So basically I need to get the FIRST occurrence of value="" and get what's between the quotes. ____________________________________ Andy Matthews Senior Coldfusion Developer Office: 877.707.5467 x747 Direct: 615.627.9747 Fax: 615.467.6249 [EMAIL PROTECTED] www.dealerskins.com <http://www.dealerskins.com/> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276681 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

