Posted to tcl by kbk at Mon Mar 24 16:55:37 GMT 2008view pretty

{
    ^               # start of string
    (?:
        "(
            (?:[^"]|\\")+  # first match - a string in double quotes
        )"
      |
        ([^\s]+)           # (alternative) second match - a string
                           # of nonblank chars
    )
    [ ]             # space
    (.+)$           # rest of string
}