R: [WSG] Javascript help with Reg Exp required please
Why not use the following? new RegExp(txt + \s, i); Diego La Monica Web 2.0 - Standards - Accessibilità mobile: +39 3337235382 - skype: diego.la.monica web: http://diegolamonica.info - http://jastegg.it _ Da: Pierre-Henri Lavigne [mailto:[EMAIL PROTECTED] Inviato: lunedì 2 giugno 2008 19.44 A: wsg@webstandardsgroup.org Oggetto: [WSG] Javascript help with Reg Exp required please Good day all, Does anyone already get the following issue ? html body script type=text/javascript var str = The Foo fooSz Fighers; var rule = /foo\s/i; console.log(str.match(rule)); // returns Foo var str2 = The Foo fooSz Fighers; var txt = foo; var rule2 = eval('/' + txt + '\s/i'); console.log(str2.match(rule2)); // returns fooSz /script /body /html or did I miss something ? Thanks, Peter --- Pierre-Henri Lavigne aka Åkeson Chihiro Frontend Developer, Fink Member http://my.opera.com/Akeson_Chihiro/ _ Découvrez les styles qui font sensation sur http://cf.avatars.yahoo.com/ Yahoo! Québec Avatars *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
R: [WSG] Javascript help with Reg Exp required please
Return Receipt Your R: [WSG] Javascript help with Reg Exp required please document: wasDennis Lapcewich/R6/USDAFS received by: at:06/02/2008 11:36:00 *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
R: [WSG] Javascript help with Reg Exp required please
Return Receipt Your R: [WSG] Javascript help with Reg Exp required please document: wasLisa Kerrigan/StateDevPolicy/DSD received by: at:03/06/2008 09:42:03 AM ** Department of Innovation, Industry and Regional Development, Government of Victoria, Victoria, Australia. This e-mail and any attachments may contain privileged and confidential information. If you are not the intended recipient, you may not distribute reproduce this e-mail or the attachments. If you have received this message in error, please notify us by return e-mail. ** *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***