Jump to content

Strip comments from a string: Difference between revisions

Added PicoLisp
(Added PicoLisp)
Line 111:
print ( string.match( s1, "[^"..comment_symbols.."]+" ) )
print ( string.match( s2, "[^"..comment_symbols.."]+" ) )</lang>
 
=={{header|PicoLisp}}==
<lang PicoLisp>(for Str '("apples, pears # and bananas" "apples, pears ; and bananas")
(prinl (car (split (chop Str) "#" ";"))) )</lang>
Output:
<pre>apples, pears
apples, pears </pre>
 
=={{header|PureBasic}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.