$trim($regexp('Genre 1 with Space, Genre 2 with Space, Genre 3 with Space','(,*)\s*([^\,]+[^,\s])','$1 [url=https://urlhere.com?taglist='$regexp($2,\s+,.)']'$2'[/url]'))
Should output: [url=https://urlhere.com?taglist=Genre.1.with.Space]Genre 1 with Space[/url], [url=https://urlhere.com?taglist=Genre.2.with.Space]Genre 2 with Space[/url], [url=https://urlhere.com?taglist=Genre.3.with Space]Genre 3 with Space[/url]
Instead: [url=https://urlhere.com?taglist=Genre 1 with Space]Genre 1 with Space[/url], [url=https://urlhere.com?taglist=Genre 2 with Space]Genre 2 with Space[/url], [url=https://urlhere.com?taglist=Genre 3 with Space]Genre 3 with Space[/url]
Should the nested $regexp($2,\s+,.) not take care of replacing any whitespaces with .
Not sure, whether you're posting this as a question or an observation
If it's a question, then the answer is no. Scripting functions are evaluated from the inmost to the outmost, so the when $regexp($2,\s+,.) is evaluated, $2 doesn't have any content yet.
Maybe I'm misunderstanding you here: $2 is replaced by the contents of the 2nd match group only at the time when the outer $regexp is evaluated. So, sure — it "returns" a string, but at the time the inner $regexp is evaluated, it doesn't contain what you're assuming it to contain.
No, most likely I won't add a dedicated function for that. It'd break the clear flow of data and make a already complicated feature even more complicated.
No problem. There might be a way to change the string with lookarounds after the fact. Lookarounds aren't that straightforward but I'm sure there's a way.