101120 wrote:
> i think there is something wrong with prototype.js1.6.03 about
> "String.prototype.gsub", i think the right is:
> 
> replace "result += String.interpret(replacement(match));" with "result
> += String.interpret(replacement(match[0]));"
> 
> you can test it with the example:
> 
> 'failure-message, success-message & spinner'.scan(/(\w|-)+/,
> Element.toggle)

This regexp would match one or more \word characters EITHER one or 
more dash'es (-). Not the one or more (word character OR dash).

Try  /[\w-]+/ instead. The square brackets creates a character class 
containing all the \w characters AND the dash. Works for me.

-- 
Regards,
Szymon Wilkołazki

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to