The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Parsing Quoted Strings in Ruby

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Mike Naberezny

Posts: 133
Nickname: mnaberez
Registered: Feb, 2007

Mike Naberezny blogs about Python.
Parsing Quoted Strings in Ruby Posted: Apr 28, 2008 7:20 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Mike Naberezny.
Original Post: Parsing Quoted Strings in Ruby
Feed Title: MikeNaberezny.com
Feed URL: http://mikenaberezny.com/category/ruby/feed/
Feed Description: Mike Naberezny blogs about Ruby, Rails, and other dynamic language topics.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Mike Naberezny
Latest Posts From MikeNaberezny.com

Advertisement
Python has a nice module in the standard library called shlex that parses strings as a Unix shell would. Here's a Python interpreter session demonstrating its usage: >>> import shlex >>> shlex.split('foo "bar baz" qux') ['foo', 'bar baz', 'qux'] It's useful for creating your own mini-languages or external DSLs that need to parse ...

Read: Parsing Quoted Strings in Ruby

Topic: I'm presenting at RailsConf Previous Topic   Next Topic Topic: RSpec Emacs Mode

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use