its used when you don't want to return any extraneous data, i.e.
if you use /echo $regex(aa,/(.)/g) it would echo a 2 in your window which is generally not want you want so you use noop $regex(aa,/(.)/g) to stop it from returning a value.
its similar to
var %variable = $regex(aa,/(.)/g) so you could perform a regex match without having to echo anything