expand_regex(): don't use a temporary variable

Also, perform a style fix.
expand_regex(): don't quote numeric arguments
expand_regex: quote the arguments properly

A single-quote cannot occur within single-quotes on a POSIX shell.