View Single Post
Old 04-12-2021, 05:02 PM   #35
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,452
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
I found a post saying that both slashes could be used and it'll be normalized, so I switched it:

Code:
program:

if $$#fanficcat then
		re(sublist($tags, ',', 0, 1), '\.', '/')

elif $formats == 'PDF' then
   'PDF'

else
		re(sublist($tags, ',', 0, 1), '^(.*?)($|\..*$)', '\1')
fi
Unfortunately now I am getting an invalid literal for int() with base 10: ',' What happened?
Because I (and you) didn't get the arguments to sublist right. They are
Code:
sublist(list_string, start_index, end_index, separator)
We both put the separator as the second argument instead of the 4th.
chaley is offline   Reply With Quote