<div dir="ltr"><div><div><div><div><div>Hi there, I'm new to Racket.<br><br></div>I'm trying to split strings on whitespace except when quoted, such as this:<br><br></div>"one two three \"four five\"" => '("one" "two" "three" "four five")<br>
<br></div><div>In Python, this could be done with shlex.split().<br></div><div><br></div>Perhaps I could do it with a lexer?<br><br>Perhaps I could do it with regular expressions?<br><br></div>Perhaps the source code for current-command-line-arguments could show me how to do it, although I can't work out how to locate it.<br>
<br>Any suggestions anyone?<br><br></div><div>Many thanks<br></div>Richard<br>
</div>