Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

quote-delineated tag sets (See related posts)

snippet to surround a tag with “smart quotes” if it contains any odd characters. i.e. to display tags entered in a flickr-like style (space separated except inside quotes)

tag.gsub(/^/,'“').gsub(/$/,'”') if tag[0].match(/[^A-Za-z0-9\-_.]/)

You need to create an account or log in to post comments to this site.


Click here to browse all 4858 code snippets

Related Posts