[/quote]
I can do that with my non-working version.
If you try this it doesn't work with artists with more than one word. Sorry for not giving that example.
Try Artist string:
This Artist1, This Artist2, This Artist3
That's why I was trying the don't match `,\s` to alleviate any problems but it appears the $regpexp fn is written differently than the replace with regular expression action as the $regexp one fails where the action does not.
$regexp('This Artist 1, This Artist 2, This Artist 3','\s*([^\,]+[^,\s])','[url="https://urlhere=$1"]$1[/url]')
resulted in: notice no space between ,
[url="https://urlhere=This Artist 1"]This Artist 1[/url],[url="https://urlhere=This Artist 2"]This Artist 2[/url],[url="https://urlhere=This Artist 3"]This Artist 3[/url]
EDIT:
$trim($regexp('This Artist 1, This Artist 2, This Artist 3','(,*)\s*([^\,]+[^,\s])','$1 [url="https://urlhere=$2"]$2[/url]'))