<div dir="ltr"><div>Regexp question:<br></div>Is there a way using regexp only to return a list with a single element?<br><div><div>I could use a Racket list function such as caar to return the second element but I am wondering if there is a way to do this using regexp only.<br>
</div><div><br>For example this regexp-match function generates the "b" that I want but it is the second element in the list. It would be ideal, from my perspective, if that was all it generated. Is there a way to write the regexp-match expression so that '("b") is output?<br>
<br>I get this:<br>(regexp-match #rx"\"(.*)" "a\"b") ; => '("\"b" "b")<br><br></div><div>I'd prefer:<br></div><div>(regexp... "a\"b" ) ; => '("b")<br>
<br></div><div>Thanks.<br>Don Green<br>
</div></div></div>