Mezzelfo
10-11-2007, 22:21
Ciao a tutti!
C'č qualcuno che conosce Lisp?
Ho installato cl-ppcre (http://www.weitz.de/cl-ppcre/)
Mi serve la funzione scan-to-strings
scan-to-strings regex target-string &key start end sharedp => match, regs
Like SCAN but returns substrings of target-string instead of positions, i.e. this function returns two values on success: the whole match as a string plus an array of substrings (or NILs) corresponding to the matched registers. If sharedp is true, the substrings may share structure with target-string.
Perņ quello che mi serve č il secondo valore che ritorna, l'array con le sottostringhe. Come faccio ad utilizzarlo?
Se faccio ad esempio
(list (cl-ppcre:scan-to-strings "REGEX" "STRINGA"))
Ottengo
("STRINGA")
Senza nessuna traccia dell'array, che viene tranquillamente stampato a video dall'interprete se lancio
(cl-ppcre:scan-to-strings "REGEX" "STRINGA")
"STRINGA" ;
#("SOTTOSTRINGA1" "SOTTOSTRINGA2" "ECC")
Grazie
C'č qualcuno che conosce Lisp?
Ho installato cl-ppcre (http://www.weitz.de/cl-ppcre/)
Mi serve la funzione scan-to-strings
scan-to-strings regex target-string &key start end sharedp => match, regs
Like SCAN but returns substrings of target-string instead of positions, i.e. this function returns two values on success: the whole match as a string plus an array of substrings (or NILs) corresponding to the matched registers. If sharedp is true, the substrings may share structure with target-string.
Perņ quello che mi serve č il secondo valore che ritorna, l'array con le sottostringhe. Come faccio ad utilizzarlo?
Se faccio ad esempio
(list (cl-ppcre:scan-to-strings "REGEX" "STRINGA"))
Ottengo
("STRINGA")
Senza nessuna traccia dell'array, che viene tranquillamente stampato a video dall'interprete se lancio
(cl-ppcre:scan-to-strings "REGEX" "STRINGA")
"STRINGA" ;
#("SOTTOSTRINGA1" "SOTTOSTRINGA2" "ECC")
Grazie