rubikitch #538(2007/07/11 07:31 GMT) [ Common Lisp ] Rating0/0=0.00
1 2 3 4 5 6 7 8 9 10
(require :cl-ppcre) (defun remove-comment (str) (ppcre:regex-replace-all "/\\*(.+?)(\\*/|$)" str "")) (remove-comment "AAA") ; => "AAA" (remove-comment "AAA/*BBB*/") ; => "AAA" (remove-comment "AAA/*BBB") ; => "AAA" (remove-comment "AAA/*BBB*/CCC") ; => "AAACCC" (remove-comment "AAA/*BBB/*CCC*/DDD*/EEE") ; => "AAADDD*/EEE" (remove-comment "AAA/a//*BB*B**/CCC") ; => "AAA/a/CCC"
Rating0/0=0.00-0+
[ reply ]
rubikitch
#538()
[
Common Lisp
]
Rating0/0=0.00
Rating0/0=0.00-0+
[ reply ]