From 1a19be7ea65fbfa0b192b2bf18a735f230f16675 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 18 Jun 2022 15:57:41 -0700 Subject: FILE:CONTAINS-INI-SETTINGS: fix extracting section names Signed-off-by: Sean Whitton --- src/property/file.lisp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/property/file.lisp b/src/property/file.lisp index 324049b..10eb6ee 100644 --- a/src/property/file.lisp +++ b/src/property/file.lisp @@ -474,10 +474,13 @@ removed, and semicolon comment chars will be replaced with '#'." (let ((new-lines (loop with current-section for line in lines - for sec = (etypecase line - (list (cadr line)) - (string (re:regex-replace - parse-section line #?/\1/))) + for sec + = (etypecase line + (list (cadr line)) + (string + (multiple-value-bind (match groups) + (re:scan-to-strings parse-section line) + (and match (elt groups 0))))) and key = (and (listp line) (caddr line)) for pair = (cons sec key) for val = (and (listp line) (gethash pair keys)) -- cgit v1.2.3