[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: quoting unquoted token?
- From: Petite Abeille <petite.abeille@...>
- Date: Wed, 5 Oct 2011 20:02:40 +0200
What would be a reasonable way to, hmmm, quote unquoted tokens?
Say a token is an uninterrupted sequence of alphanumeric characters (%w) or a quoted token. A quoted token is any sequence of characters inside quotes, minus any quote characters.
'foo "hello world" bar'
How to turn the above into:
'"foo" "hello world" "bar"'