Thanks a bunch, Karl. :)
On Mar 20, 8:39 pm, Karl Swedberg wrote:
> Hi Eric,
>
> These should work:
>
> var classes = 'your .string'.match(/\.[a-zA-Z_-]+/g);
> var ids = 'your #string'.match(/#[a-zA-Z_-]+/g);
> var idsAndClasses = '#your .string'.match(/(\.|#)[a-zA-Z_-]+/g);
>
> --Karl
>
> _
Hi Eric,
These should work:
var classes = 'your .string'.match(/\.[a-zA-Z_-]+/g);
var ids = 'your #string'.match(/#[a-zA-Z_-]+/g);
var idsAndClasses = '#your .string'.match(/(\.|#)[a-zA-Z_-]+/g);
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Mar 20, 2009
2 matches
Mail list logo