[jQuery] Re: Regex Help for CSS Selector type deal

2009-03-23 Thread Eric Garside
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 > > _

[jQuery] Re: Regex Help for CSS Selector type deal

2009-03-20 Thread Karl Swedberg
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