You just need to update the regex to do a global search first ('sg'), and then loop through the results.
'sg'
You can download the demo vault and copy the method used in this post: